services

package
v5.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: AGPL-3.0 Imports: 73 Imported by: 0

Documentation

Overview

Package services is a generated GoMock package.

Index

Constants

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

Variables

View Source
var ErrorPermissionDenied = repo.ToError(403, "没有权限执行该操作")
View Source
var MustGetUser = auth2.MustGetUser

Functions

func NewAccessTokenSvc

func NewAccessTokenSvc(logger mlog.Logger, eventRepo repo.EventRepo, timer timer.Timer, repo repo.AccessTokenRepo) token.AccessTokenServer

func NewAuthSvc

func NewAuthSvc(eventRepo repo.EventRepo, logger mlog.Logger, authRepo repo.AuthRepo) auth.AuthServer

func NewChangelogSvc

func NewChangelogSvc(repo repo.ChangelogRepo) changelog.ChangelogServer

func NewClusterSvc

func NewClusterSvc(repo repo.K8sRepo, logger mlog.Logger) cluster.ClusterServer

func NewContainerSvc

func NewContainerSvc(timer timer.Timer, eventRepo repo.EventRepo, k8sRepo repo.K8sRepo, fileRepo repo.FileRepo, logger mlog.Logger) container.ContainerServer

func NewEndpointSvc

func NewEndpointSvc(logger mlog.Logger, epRepo repo.EndpointRepo) endpoint.EndpointServer

func NewEventSvc

func NewEventSvc(logger mlog.Logger, eventRepo repo.EventRepo) event.EventServer

func NewFileSvc

func NewFileSvc(eventRepo repo.EventRepo, fileRepo repo.FileRepo, logger mlog.Logger) file.FileServer

func NewGitSvc

func NewGitSvc(repoRepo repo.RepoRepo, eventRepo repo.EventRepo, logger mlog.Logger, gitRepo repo.GitRepo, cache cache.Cache) git.GitServer

func NewGrpcRegistry

func NewGrpcRegistry(
	v version.VersionServer,
	server project.ProjectServer,
	pictureServer picture.PictureServer,
	namespaceServer namespace.NamespaceServer,
	ms metrics.MetricsServer,
	gitServer git.GitServer,
	fileServer file.FileServer,
	eventServer event.EventServer,
	endpointServer endpoint.EndpointServer,
	containerServer container.ContainerServer,
	clusterServer cluster.ClusterServer,
	changelogServer changelog.ChangelogServer,
	authServer auth.AuthServer,
	tokenServer token.AccessTokenServer,
	repoServer repo.RepoServer,
) *application.GrpcRegistry

func NewHttpHandler

func NewHttpHandler(
	wsHttpServer application.WsHttpServer,
	logger mlog.Logger,
	uploader uploader.Uploader,
	authRepo repo.AuthRepo,
	eventRepo repo.EventRepo,
	fileRepo repo.FileRepo,
	timer timer.Timer,
	k8sRepo repo.K8sRepo,
) application.HttpHandler

func NewMessager

func NewMessager(sendPercent bool, slugName string, t websocket.Type, server project.Project_ApplyServer) socket.DeployMsger

func NewMetricsSvc

func NewMetricsSvc(timer timer.Timer, k8sRepo repo.K8sRepo, logger mlog.Logger, projRepo repo.ProjectRepo, nsRepo repo.NamespaceRepo) metrics.MetricsServer

func NewNamespaceSvc

func NewNamespaceSvc(helmer repo.HelmerRepo, nsRepo repo.NamespaceRepo, k8sRepo repo.K8sRepo, logger mlog.Logger, eventRepo repo.EventRepo) namespace.NamespaceServer

func NewPictureSvc

func NewPictureSvc(picRepo repo.PictureRepo) picture.PictureServer

func NewProjectSvc

func NewProjectSvc(
	repoRepo repo.RepoRepo,
	plMgr application.PluginManger,
	jobManager socket.JobManager,
	projRepo repo.ProjectRepo,
	gitRepo repo.GitRepo,
	k8sRepo repo.K8sRepo,
	eventRepo repo.EventRepo,
	logger mlog.Logger,
	helmer repo.HelmerRepo,
	nsRepo repo.NamespaceRepo,
) project.ProjectServer

func NewRepoSvc

func NewRepoSvc(logger mlog.Logger, eventRepo repo.EventRepo, gitRepo repo.GitRepo, repoRepo repo.RepoRepo) reposerver.RepoServer

func NewVersionSvc

func NewVersionSvc() version.VersionServer

Types

type CopyFromPodRequest

type CopyFromPodRequest struct {
	Namespace string `json:"namespace"`
	Pod       string `json:"pod"`
	Container string `json:"container"`
	FilePath  string `json:"filepath"`
}

type MockMetrics_StreamTopPodServer

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

MockMetrics_StreamTopPodServer is a mock of Metrics_StreamTopPodServer interface.

func NewMockMetrics_StreamTopPodServer

func NewMockMetrics_StreamTopPodServer(ctrl *gomock.Controller) *MockMetrics_StreamTopPodServer

NewMockMetrics_StreamTopPodServer creates a new mock instance.

func (*MockMetrics_StreamTopPodServer) Context

Context mocks base method.

func (*MockMetrics_StreamTopPodServer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMetrics_StreamTopPodServer) RecvMsg

func (m *MockMetrics_StreamTopPodServer) RecvMsg(arg0 any) error

RecvMsg mocks base method.

func (*MockMetrics_StreamTopPodServer) Send

Send mocks base method.

func (*MockMetrics_StreamTopPodServer) SendHeader

func (m *MockMetrics_StreamTopPodServer) SendHeader(arg0 metadata.MD) error

SendHeader mocks base method.

func (*MockMetrics_StreamTopPodServer) SendMsg

func (m *MockMetrics_StreamTopPodServer) SendMsg(arg0 any) error

SendMsg mocks base method.

func (*MockMetrics_StreamTopPodServer) SetHeader

func (m *MockMetrics_StreamTopPodServer) SetHeader(arg0 metadata.MD) error

SetHeader mocks base method.

func (*MockMetrics_StreamTopPodServer) SetTrailer

func (m *MockMetrics_StreamTopPodServer) SetTrailer(arg0 metadata.MD)

SetTrailer mocks base method.

type MockMetrics_StreamTopPodServerMockRecorder

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

MockMetrics_StreamTopPodServerMockRecorder is the mock recorder for MockMetrics_StreamTopPodServer.

func (*MockMetrics_StreamTopPodServerMockRecorder) Context

Context indicates an expected call of Context.

func (*MockMetrics_StreamTopPodServerMockRecorder) RecvMsg

RecvMsg indicates an expected call of RecvMsg.

func (*MockMetrics_StreamTopPodServerMockRecorder) Send

Send indicates an expected call of Send.

func (*MockMetrics_StreamTopPodServerMockRecorder) SendHeader

SendHeader indicates an expected call of SendHeader.

func (*MockMetrics_StreamTopPodServerMockRecorder) SendMsg

SendMsg indicates an expected call of SendMsg.

func (*MockMetrics_StreamTopPodServerMockRecorder) SetHeader

SetHeader indicates an expected call of SetHeader.

func (*MockMetrics_StreamTopPodServerMockRecorder) SetTrailer

SetTrailer indicates an expected call of SetTrailer.

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

Jump to

Keyboard shortcuts

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