Documentation ¶
Index ¶
- Constants
- type ApplicationInterface
- type AuthInterface
- type AuthorizeInterface
- type Bootstrapper
- type Callback
- type ClaimUserInfo
- type DBManager
- type DispatcherInterface
- type Event
- type FileInfo
- type JwtClaims
- type K8s
- type K8sClient
- type Listener
- type LoggerInterface
- type OidcConfig
- type OidcConfigItem
- type OpenIDClaims
- type PluginInterface
- type ProxyManagerInterface
- type ProxyPod
- 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 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, namespace string) (K8s, error) ProxyManager() ProxyManagerInterface SetProxyManager(ProxyManagerInterface) }
type AuthInterface ¶
type AuthorizeInterface ¶
type Bootstrapper ¶
type Bootstrapper interface {
Bootstrap(ApplicationInterface) error
}
type Callback ¶
type Callback func(ApplicationInterface)
type ClaimUserInfo ¶ added in v0.0.59
type ClaimUserInfo struct { LogoutUrl string `json:"logout_url"` OpenIDClaims }
func (ClaimUserInfo) ToUserInfo ¶ added in v0.0.59
func (c ClaimUserInfo) ToUserInfo() UserInfo
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 K8s ¶ added in v0.0.10
type K8s interface { 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 JobLister() corev1.JobLister }
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 PluginInterface ¶
type ProxyManagerInterface ¶ added in v0.0.56
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) NewFile(path string) (*os.File, error) AllDirectoryFiles(dir string) ([]FileInfo, error) RemoveEmptyDir(dir string) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.