services

package
v4.20.5 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: AGPL-3.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OptionTypeProject string = "project"
	OptionTypeBranch  string = "branch"
	OptionTypeCommit  string = "commit"
)
View Source
const ProjectOptionsCacheKey = "ProjectOptions"

Variables

View Source
var AuditLog = func(username string, action types.EventActionType, msg string) {
	events.AuditLog(username, action, msg, nil, nil)
}
View Source
var AuditLogWithChange = events.AuditLog
View Source
var ErrorPermissionDenied = errors.New("没有权限执行该操作")
View Source
var FileAuditLog = func(username string, msg string, fileID int) {
	events.FileAuditLog(username, msg, fileID)
}
View Source
var GetProjectMarsConfig = utils.GetProjectMarsConfig
View Source
var MustGetUser = auth.MustGetUser

Functions

func FindDefaultContainer

func FindDefaultContainer(pod *v1.Pod) string

func RegisterEndpoint

func RegisterEndpoint(fn endpointFunc)

func RegisterServer

func RegisterServer(fn registryFunc)

func RegisteredEndpoints

func RegisteredEndpoints() []endpointFunc

func RegisteredServers

func RegisteredServers() []registryFunc

Types

type OidcAuthProvider

type OidcAuthProvider interface {
	Exchange(ctx context.Context, code string) (string, error)
	Verify(ctx context.Context, token string) (idToken, error)
}

func NewDefaultAuthProvider

func NewDefaultAuthProvider(cfg oauth2.Config, provider *oidc.Provider) OidcAuthProvider

type Steamer

type Steamer interface {
	Stream(ctx context.Context, namespace, pod, container string) (io.ReadCloser, error)
}

Jump to

Keyboard shortcuts

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