Documentation ¶
Index ¶
- Constants
- type ApplicationInterface
- type AuthInterface
- type AuthorizeInterface
- type Bootstrapper
- type Callback
- type DBManager
- type DispatcherInterface
- type Event
- type FileInfo
- type JwtClaims
- type K8sClient
- type Listener
- type LoggerInterface
- type Metrics
- type OidcConfig
- type OidcConfigItem
- type OpenIDClaims
- type Option
- type PluginInterface
- type Server
- type SignData
- type Uploader
- type UserInfo
Constants ¶
View Source
const Expired = 8 * time.Hour
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationInterface ¶
type ApplicationInterface interface { IsDebug() bool SetMetrics(Metrics) Metrics() Metrics Auth() AuthInterface SetAuth(AuthInterface) SetUploader(Uploader) Uploader() Uploader Bootstrap() error Config() *config.Config DBManager() DBManager Oidc() OidcConfig SetOidc(OidcConfig) AddServer(Server) Run() context.Context Shutdown() Done() <-chan struct{} BeforeServerRunHooks(Callback) RegisterBeforeShutdownFunc(Callback) RegisterAfterShutdownFunc(Callback) EventDispatcher() DispatcherInterface SetEventDispatcher(DispatcherInterface) SetPlugins(map[string]PluginInterface) GetPlugins() map[string]PluginInterface GetPluginByName(string) PluginInterface ReleaseKubeClient(name string) error ReleaseAllKubeClient() error LoadKubeClient(name string, kubeConfig []byte) (*K8sClient, error) }
type AuthInterface ¶
type AuthorizeInterface ¶
type Bootstrapper ¶
type Bootstrapper interface {
Bootstrap(ApplicationInterface) error
}
type Callback ¶
type Callback func(ApplicationInterface)
type DispatcherInterface ¶
type DispatcherInterface interface { // Listen Register an event listener with the dispatcher. Listen(Event, Listener) // HasListeners Determine if a given event has listeners. HasListeners(Event) bool // Dispatch Fire an event and call the listeners. Dispatch(Event, any) error // Forget Remove a set of listeners from the dispatcher. Forget(Event) GetListeners(Event) []Listener }
type JwtClaims ¶
type JwtClaims struct { *jwt.StandardClaims UserInfo }
type K8sClient ¶
type K8sClient struct { Client kubernetes.Interface MetricsClient versioned.Interface RestConfig *restclient.Config Informer informers.SharedInformerFactory Done chan struct{} PodLister v1.PodLister PodListerSynced func() bool DeploymentLister appsv1.DeploymentLister DeploymentListerSynced func() bool StatefulSetLister appsv1.StatefulSetLister StatefulSetListerSynced func() bool }
type LoggerInterface ¶
type OidcConfig ¶
type OidcConfig map[string]OidcConfigItem
type OidcConfigItem ¶
type OpenIDClaims ¶
type OpenIDClaims struct { Sub string `json:"sub"` Name string `json:"name"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` MiddleName string `json:"middle_name"` Nickname string `json:"nickname"` PreferredUsername string `json:"preferred_username"` Profile string `json:"profile"` Picture string `json:"picture"` Website string `json:"website"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` Gender string `json:"gender"` Birthdate string `json:"birthdate"` Zoneinfo string `json:"zoneinfo"` Locale string `json:"locale"` PhoneNumber string `json:"phone_number"` PhoneNumberVerified bool `json:"phone_number_verified"` Address map[string]any `json:"address"` UpdatedAt int `json:"updated_at"` }
type Option ¶
type Option func(ApplicationInterface)
type PluginInterface ¶
type Uploader ¶
type Uploader interface { Disk(string) Uploader DeleteDir(dir string) error DirSize(dir string) (int64, error) Delete(path string) error Exists(path string) bool MkDir(path string, recursive bool) error AbsolutePath(path string) string Put(path string, content io.Reader) (FileInfo, error) AllDirectoryFiles(dir string) ([]FileInfo, error) RemoveEmptyDir(dir string) error }
Click to show internal directories.
Click to hide internal directories.