Documentation
¶
Index ¶
- Variables
- type AdminLockUserCreationReq
- type AdminLockUserCreationResp
- type BashCmd
- type BashCommandOuputReq
- type BashCommandOuputResp
- type Config
- type CreateUserReq
- type CreateUserResp
- type GroupReq
- type GroupResp
- type ListBashCommandsReq
- type ListBashCommandsResp
- type ListGroupsReq
- type ListGroupsResp
- type ListServicesReq
- type ListServicesResp
- type ListUsersReq
- type ListUsersResp
- type RoutesReq
- type RoutesResp
- type RunBashCommandReq
- type RunBashCommandResp
- type Server
- type SetPortReq
- type SetPortResp
- type Settings
- type SettingsReq
- type TemplateNames
- type UserGroupReq
- type UserGroupResp
Constants ¶
This section is empty.
Variables ¶
View Source
var TimeoutDuration = time.Second * 5
Functions ¶
This section is empty.
Types ¶
type AdminLockUserCreationReq ¶
type AdminLockUserCreationReq struct {
AdminLockUserCreation bool
}
type AdminLockUserCreationResp ¶
type AdminLockUserCreationResp struct{}
type BashCmd ¶
type BashCommandOuputReq ¶
type BashCommandOuputReq struct {
ID int
}
type BashCommandOuputResp ¶
type BashCommandOuputResp struct {
Msg string
}
type Config ¶
type Config struct {
SessionStore sessions.Store
Templates *template.Template
UserStore store.NestedFactory
TemplateNames
ServiceSocket string
core.Config
BashCommands []BashCmd
Commander lexec.Commander
}
Config is used to create a Server. It holds all the configuration values. This follows the builder pattern instead of using a function that would take many arguments.
type CreateUserReq ¶
type CreateUserReq struct {
Name, Password string
}
type CreateUserResp ¶
type CreateUserResp struct {
Error error
}
type ListBashCommandsReq ¶
type ListBashCommandsReq struct {
}
type ListBashCommandsResp ¶
type ListBashCommandsResp []BashCmd
type ListGroupsReq ¶
type ListGroupsReq struct{}
type ListGroupsResp ¶
type ListGroupsResp []string
type ListServicesReq ¶
type ListServicesReq struct {
}
type ListServicesResp ¶
type ListServicesResp []string
type ListUsersReq ¶
type ListUsersReq struct{}
type ListUsersResp ¶
type ListUsersResp []string
type RoutesResp ¶
type RoutesResp string
type RunBashCommandReq ¶
type RunBashCommandReq struct {
ID int
}
type RunBashCommandResp ¶
type RunBashCommandResp struct {
Msg string
}
type Server ¶
type Server struct {
Users *lusess.Store
Settings Settings
Templates *template.Template
ServiceSocket string
TemplateNames
lerr.ErrHandler
BashCommands slice.Slice[BashCmd]
Commander lexec.Commander
// contains filtered or unexported fields
}
Server runs a webserver.
func (*Server) Run ¶
func (s *Server) Run()
Run the server. If Socket or ServiceSocket is defined, they will be run as well.
func (*Server) RunServiceSocket ¶
type SetPortReq ¶
type SetPortReq struct {
Port string
}
type SetPortResp ¶
type SetPortResp struct{}
type SettingsReq ¶
type SettingsReq struct{}
type TemplateNames ¶
type UserGroupReq ¶
type UserGroupReq struct {
User, Group string
}
type UserGroupResp ¶
type UserGroupResp struct {
Error error
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.