Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessControlList ¶
type AccessControlList struct { Name string AddToEveryAction bool MatchUsergroups []string MatchUsernames []string Permissions PermissionsList }
AccessControlList defines what permissions apply to a user or user group.
type Action ¶
type Action struct { ID string Title string Icon string Shell string ShellAfterCompleted string Timeout int Acls []string Entity string Hidden bool ExecOnStartup bool ExecOnCron []string ExecOnFileCreatedInDir []string ExecOnFileChangedInDir []string ExecOnCalendarFile string Trigger string MaxConcurrent int Arguments []ActionArgument PopupOnStart string }
Action represents the core functionality of OliveTin - commands that show up as buttons in the UI.
func (*Action) FindArg ¶
func (action *Action) FindArg(name string) *ActionArgument
FindArg will return an arg if there is a match on Name
type ActionArgument ¶
type ActionArgument struct { Name string Title string Description string Type string Default string Choices []ActionArgumentChoice Entity string Suggestions map[string]string }
ActionArgument objects appear on Actions.
type ActionArgumentChoice ¶
ActionArgumentChoice represents a predefined choice for an argument.
type Config ¶
type Config struct { UseSingleHTTPFrontend bool ThemeName string ListenAddressSingleHTTPFrontend string ListenAddressWebUI string ListenAddressRestActions string ListenAddressGrpcActions string ExternalRestAddress string LogLevel string Actions []*Action `mapstructure:"actions"` Entities []*EntityFile `mapstructure:"entities"` Dashboards []*DashboardComponent `mapstructure:"dashboards"` CheckForUpdates bool PageTitle string ShowNewVersions bool AuthJwtCookieName string AuthJwtSecret string // mutually exclusive with pub key config fields AuthJwtClaimUsername string AuthJwtClaimUserGroup string AuthJwtPubKeyPath string // will read pub key from file on disk AuthHttpHeaderUsername string AuthHttpHeaderUserGroup string DefaultPermissions PermissionsList AccessControlLists []*AccessControlList WebUIDir string CronSupportForSeconds bool DefaultPopupOnStart string InsecureAllowDumpVars bool InsecureAllowDumpSos bool InsecureAllowDumpActionMap bool }
Config is the global config used through the whole app.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig gets a new Config structure with sensible default values.
func (*Config) FindAcl ¶
func (cfg *Config) FindAcl(aclTitle string) *AccessControlList
func (*Config) FindAction ¶
FindAction will return a action if there is a match on Title
type DashboardComponent ¶
type DashboardComponent struct { Title string Type string Entity string Contents []DashboardComponent }
type EntityFile ¶
Entity represents a "thing" that can have multiple actions associated with it. for example, a media player with a start and stop action.
type PermissionsList ¶
PermissionsList defines what users can do with an action.