Documentation ¶
Index ¶
- type AppConfig
- type AppConfigAzure
- type AppConfigAzureResourceGroupTag
- type AppConfigFilter
- type AppConfigKubernetes
- type AppConfigKubernetesEnvironment
- type AppConfigKubernetesNamespace
- type AppConfigKubernetesNetworkPolicy
- type AppConfigKubernetesRoleBindingMetaData
- type AppConfigNamespaceSettings
- type AppConfigPermissions
- type AppConfigSupport
- type AppConfigSupportPagerduty
- type AppConfigSupportPagerdutyEndpoint
- type AppConfigSupportPagerdutyServices
- type AppConfigTeam
- type AppInputTransformation
- type AppInputValidation
- type Application
- type ApplicationFeatures
- type ApplicationKubernetesNetworkPolicy
- type KubernetesNamespace
- type KubernetesObject
- type KubernetesObjectList
- type OAuthConfig
- type PagerDutyEndpoint
- type Team
- type TeamAzureRoleAssignments
- type TeamK8sPermissions
- type TeamPermissionsServiceAccount
- type TeamServiceConnections
- type User
- func (u *User) ApplyAppConfig(config *AppConfig)
- func (u *User) GetTeam(name string) (*AppConfigTeam, error)
- func (u *User) GetTeams() (teamList []*AppConfigTeam)
- func (u *User) IsMemberOf(name string) bool
- func (u *User) LoggedIn() bool
- func (u *User) String() string
- func (u *User) ToJson() (jsonString string, error error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { App Application `yaml:"application"` Azure AppConfigAzure `yaml:"azure"` Kubernetes AppConfigKubernetes `yaml:"kubernetes"` Permissions AppConfigPermissions `yaml:"permissions"` Support AppConfigSupport `yaml:"support"` }
func AppConfigCreateFromYaml ¶
type AppConfigAzure ¶
type AppConfigAzure struct { RoleAssignment struct { Filter struct { ResourceId AppConfigFilter `yaml:"resourceId"` } RoleDefinitions []string Ttl []string } ResourceGroup struct { RoleDefinitionName string `yaml:"roleDefinitionName"` Filter struct { Name AppConfigFilter `yaml:"name"` } Tags []AppConfigAzureResourceGroupTag } }
type AppConfigAzureResourceGroupTag ¶
type AppConfigAzureResourceGroupTag struct { Name string Label string Description string Type string Default string Placeholder string Validation AppInputValidation Transformation AppInputTransformation }
type AppConfigFilter ¶
func (*AppConfigFilter) String ¶
func (f *AppConfigFilter) String() (ret string)
func (*AppConfigFilter) UnmarshalYAML ¶
func (f *AppConfigFilter) UnmarshalYAML(unmarshal func(interface{}) error) error
func (*AppConfigFilter) Validate ¶
func (f *AppConfigFilter) Validate(val string) bool
type AppConfigKubernetes ¶
type AppConfigKubernetes struct { ObjectsPath string `yaml:"objectsPath"` ObjectsList map[string]KubernetesObjectList RoleBinding AppConfigKubernetesRoleBindingMetaData `yaml:"roleBinding"` Namespace AppConfigKubernetesNamespace }
type AppConfigKubernetesNamespace ¶
type AppConfigKubernetesNamespace struct { ClusterRoleName string `yaml:"clusterRoleName"` LabelSelector string `yaml:"labelSelector"` Filter struct { Access AppConfigFilter Delete AppConfigFilter } Validation struct { Namespace AppConfigFilter Team AppConfigFilter } Annotations struct { Description string Immortal string NetworkPolicy string `yaml:"networkPolicy"` } Labels struct { Team string ManagedBy string `yaml:"managedBy"` } Quota struct { Team int } Settings []AppConfigNamespaceSettings NetworkPolicy []AppConfigKubernetesNetworkPolicy `yaml:"networkPolicy"` }
type AppConfigKubernetesNetworkPolicy ¶
type AppConfigKubernetesNetworkPolicy struct { Name string Description string Path string Default bool // contains filtered or unexported fields }
func (*AppConfigKubernetesNetworkPolicy) GetKubernetesObject ¶
func (netpol *AppConfigKubernetesNetworkPolicy) GetKubernetesObject() *networkingV1.NetworkPolicy
func (*AppConfigKubernetesNetworkPolicy) SetKubernetesObject ¶
func (netpol *AppConfigKubernetesNetworkPolicy) SetKubernetesObject(obj *networkingV1.NetworkPolicy)
type AppConfigPermissions ¶
type AppConfigPermissions struct { AdminGroups []string `yaml:"adminGroups"` Teams map[string]*AppConfigTeam `yaml:"teams"` }
type AppConfigSupport ¶
type AppConfigSupport struct {
Pagerduty AppConfigSupportPagerduty `yaml:"pagerduty"`
}
type AppConfigSupportPagerduty ¶
type AppConfigSupportPagerduty struct { AuthToken string `yaml:"authToken"` ClientURL string `yaml:"clientURL"` Services []AppConfigSupportPagerdutyServices `yaml:"services"` EndpointNameTemplate string `yaml:"endpointNameTemplate"` EndpointServiceRegexp string `yaml:"endpointServiceRegexp"` EndpointIntegrationRegexp string `yaml:"endpointIntegrationRegexp"` }
type AppConfigSupportPagerdutyEndpoint ¶
type AppConfigSupportPagerdutyEndpoint struct {
RoutingKey string `yaml:"routingKey"`
}
type AppConfigTeam ¶
type AppInputTransformation ¶
type AppInputTransformation struct {
Convert string `yaml:"convert"`
}
func (*AppInputTransformation) Transform ¶
func (v *AppInputTransformation) Transform(value string) (ret *string)
type AppInputValidation ¶
func (*AppInputValidation) HumanizeString ¶
func (v *AppInputValidation) HumanizeString() (ret string)
func (*AppInputValidation) Validate ¶
func (v *AppInputValidation) Validate(value string) (status bool)
type Application ¶
type Application struct { Features map[string]bool Session struct { Type string Expiry time.Duration CookieName string `yaml:"cookieName"` CookieSecure bool `yaml:"cookieSecure"` CookieDomain string `yaml:"cookieDomain"` CookieSameSite string `yaml:"cookieSameSite"` Internal struct { } `yaml:"internal"` SecureCookie struct { HashKey string `yaml:"hashKey"` BlockKey string `yaml:"blockKey"` } `yaml:"secureCookie"` Redis struct { Addr string `yaml:"addr"` Timeout time.Duration `yaml:"timeout"` MaxActive int `yaml:"maxActive"` Password string `yaml:"password"` Database string `yaml:"database"` Delim string `yaml:"delim"` } `yaml:"redis"` } Csrf struct { Secret string `yaml:"secret"` } `yaml:"csrf"` Oauth OAuthConfig `yaml:"oauth"` Notification struct { Channels []string Message string } }
func (*Application) FeatureIsEnabled ¶
func (a *Application) FeatureIsEnabled(main, branch string) bool
func (*Application) MainFeatureIsEnabled ¶
func (a *Application) MainFeatureIsEnabled(main string) bool
type ApplicationFeatures ¶
type KubernetesNamespace ¶
func (*KubernetesNamespace) SettingsApply ¶
func (n *KubernetesNamespace) SettingsApply(settings map[string]string, config AppConfigKubernetes)
func (*KubernetesNamespace) SettingsExtract ¶
func (n *KubernetesNamespace) SettingsExtract(config AppConfigKubernetes) (ret map[string]string)
type KubernetesObject ¶
type KubernetesObjectList ¶
type KubernetesObjectList []KubernetesObject
type OAuthConfig ¶
type OAuthConfig struct { Provider string `yaml:"provider"` UsernamePrefix string `yaml:"usernamePrefix"` GroupPrefix string `yaml:"groupPrefix"` RedirectUrl string `yaml:"redirectUrl"` Azure struct { Tenant string `yaml:"tenant"` ClientId string `yaml:"clientId"` ClientSecret string `yaml:"clientSecret"` } `yaml:"azuread"` Filter struct { UsernameWhitelist string `yaml:"usernameWhitelist"` UsernameBlacklist string `yaml:"usernameBlacklist"` } `yaml:"filter"` }
type PagerDutyEndpoint ¶
type Team ¶
type Team struct { Name string `json:"-"` K8sPermissions []TeamK8sPermissions `json:"-"` AzureRoleAssignments []TeamAzureRoleAssignments `json:"-"` }
type TeamK8sPermissions ¶
type TeamK8sPermissions struct { Name string `yaml:"name"` Groups []string `yaml:"groups"` Users []string `yaml:"users"` ServiceAccounts []TeamPermissionsServiceAccount `yaml:"serviceaccounts"` ClusterRole string `yaml:"clusterrole"` }
type TeamServiceConnections ¶
type TeamServiceConnections struct {
Token string `yaml:"token"`
}
type User ¶
type User struct { Uuid string `json:"Uuid"` Id string `json:"id"` Username string `json:"upn"` Email string `json:"mail"` Groups []string `json:"groups"` IsAdmin bool `json:"isAdmin"` // contains filtered or unexported fields }
func UserCreateFromJson ¶
func (*User) ApplyAppConfig ¶
func (*User) GetTeams ¶
func (u *User) GetTeams() (teamList []*AppConfigTeam)
func (*User) IsMemberOf ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.