admin

package
v1.35.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminServer

type AdminServer struct {
	// contains filtered or unexported fields
}

func (*AdminServer) Run

func (as *AdminServer) Run()

func (*AdminServer) Shutdown

func (as *AdminServer) Shutdown(ctx context.Context) error

type CustomProvidersManager

type CustomProvidersManager interface {
	CreateCustomProvider(setting *custom.Provider) (*custom.Provider, error)
	GetCustomProviders() ([]*custom.Provider, error)
	GetRouteConfigFromMem(name, path string) *custom.RouteConfig
	GetCustomProviderFromMem(name string) *custom.Provider
	UpdateCustomProvider(id string, setting *custom.UpdateProvider) (*custom.Provider, error)
}

type ErrorResponse

type ErrorResponse struct {
	Type     string `json:"type"`
	Title    string `json:"title"`
	Status   int    `json:"status"`
	Detail   string `json:"detail"`
	Instance string `json:"instance"`
}

type KeyManager

type KeyManager interface {
	GetKeys(tags, keyIds []string, provider string) ([]*key.ResponseKey, error)
	GetKeysV2(tags, keyIds []string, revoked *bool, limit, offset int, name, order string, returnCount bool) (*key.GetKeysResponse, error)
	UpdateKey(id string, key *key.UpdateKey) (*key.ResponseKey, error)
	CreateKey(key *key.RequestKey) (*key.ResponseKey, error)
	DeleteKey(id string) error
}

type KeyReportingManager

type KeyReportingManager interface {
	GetTopKeyReporting(r *event.KeyReportingRequest) (*event.KeyReportingResponse, error)
	GetKeyReporting(keyId string) (*key.KeyReporting, error)
	GetEvents(userId, customId string, keyIds []string, start int64, end int64) ([]*event.Event, error)
	GetEventsV2(r *event.EventRequest) (*event.EventResponse, error)
	GetEventReporting(e *event.ReportingRequest) (*event.ReportingResponse, error)
	GetAggregatedEventByDayReporting(e *event.ReportingRequest) (*event.ReportingResponse, error)
	GetCustomIds(keyId string) ([]string, error)
	GetUserIds(keyId string) ([]string, error)
}

type PoliciesManager added in v1.13.0

type PoliciesManager interface {
	CreatePolicy(p *policy.Policy) (*policy.Policy, error)
	UpdatePolicy(id string, p *policy.UpdatePolicy) (*policy.Policy, error)
	GetPoliciesByTags(tags []string) ([]*policy.Policy, error)
}

type ProviderSettingsManager

type ProviderSettingsManager interface {
	CreateSetting(setting *provider.Setting) (*provider.Setting, error)
	UpdateSetting(id string, setting *provider.UpdateSetting) (*provider.Setting, error)
	GetSettingViaCache(id string) (*provider.Setting, error)
	GetSettingsViaCache(ids []string) ([]*provider.Setting, error)
}

type RouteManager added in v1.7.0

type RouteManager interface {
	DeleteRoute(id string) error
	GetRoute(id string) (*route.Route, error)
	GetRoutes() ([]*route.Route, error)
	CreateRoute(r *route.Route) (*route.Route, error)
}

type UserManager added in v1.18.0

type UserManager interface {
	GetUsers(tags, keyIds, userIds []string, offset int, limit int) ([]*user.User, error)
	CreateUser(u *user.User) (*user.User, error)
	UpdateUser(id string, uu *user.UpdateUser) (*user.User, error)
	UpdateUserViaTagsAndUserId(tags []string, uid string, uu *user.UpdateUser) (*user.User, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL