repo

package
v5.0.0-beta.23 Latest Latest
Warning

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

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

Documentation

Overview

Package repo is a generated GoMock package.

Index

Constants

View Source
const (
	AuditLogEvent         event.Event = "audit_log"
	EventNamespaceCreated event.Event = "namespace_created"
	EventNamespaceDeleted event.Event = "namespace_deleted"
	EventProjectChanged   event.Event = "project_changed"
	EventProjectDeleted   event.Event = "project_deleted"
)
View Source
const (
	StatusUnknown  string = "unknown"
	StatusPending  string = "pending"
	StatusDeployed string = "deployed"
	StatusFailed   string = "failed"
)
View Source
const RevisionAnnotation = "deployment.kubernetes.io/revision"
View Source
const StreamUploadFileDisk = "grpc_upload"

Variables

View Source
var DirSizeCacheSeconds = int((15 * time.Minute).Seconds())

Functions

func IsRemoteLocalChartPath

func IsRemoteLocalChartPath(input string) bool

func ToError

func ToError(code uint32, err any) error

Types

type AccessToken

type AccessToken struct {
	ID         int
	CreatedAt  time.Time
	UpdatedAt  time.Time
	DeletedAt  *time.Time
	Token      string
	Usage      string
	Email      string
	ExpiredAt  time.Time
	LastUsedAt *time.Time
	UserInfo   schematype.UserInfo
}

func ToAccessToken

func ToAccessToken(token *ent.AccessToken) *AccessToken

func (*AccessToken) Expired

func (at *AccessToken) Expired() bool

type AccessTokenRepo

type AccessTokenRepo interface {
	List(ctx context.Context, input *ListAccessTokenInput) ([]*AccessToken, *pagination.Pagination, error)
	Grant(ctx context.Context, input *GrantAccessTokenInput) (*AccessToken, error)
	Lease(ctx context.Context, token string, expireSeconds int32) (*AccessToken, error)
	Revoke(ctx context.Context, token string) error
}

func NewAccessTokenRepo

func NewAccessTokenRepo(timer timer.Timer, logger mlog.Logger, data data.Data) AccessTokenRepo

type AllRepoRequest

type AllRepoRequest struct {
	NeedGitRepo   *bool
	Enabled       *bool
	OrderByIDDesc *bool
}

type AnyYamlPrettier

type AnyYamlPrettier map[string]any

func (*AnyYamlPrettier) PrettyYaml

func (s *AnyYamlPrettier) PrettyYaml() string

type Archiver

type Archiver interface {
	Archive(sources []string, destination string) error
	Open(path string) (io.ReadCloser, error)
	Remove(path string) error
}

func NewDefaultArchiver

func NewDefaultArchiver() Archiver

type AuditLog

type AuditLog interface {
	// GetUsername 获取用户
	GetUsername() string
	// GetAction 行为
	GetAction() types.EventActionType
	// GetMsg desc
	GetMsg() string
	// GetOldStr old config str
	GetOldStr() string
	// GetNewStr new config str
	GetNewStr() string
	// GetFileID file id
	GetFileID() int
	// GetDuration duration
	GetDuration() string
}

func NewEventAuditLog

func NewEventAuditLog(username string, action types.EventActionType, msg string, opts ...AuditOption) AuditLog

type AuditOption

type AuditOption func(*auditLogImpl)

func AuditWithDuration

func AuditWithDuration(d string) AuditOption

func AuditWithFileID

func AuditWithFileID(id int) AuditOption

func AuditWithOldNew

func AuditWithOldNew(o, n YamlPrettier) AuditOption

func AuditWithOldNewStr

func AuditWithOldNewStr(o, n string) AuditOption

type AuthRepo

type AuthRepo interface {
	Login(ctx context.Context, input *LoginInput) (*LoginResponse, error)
	VerifyToken(ctx context.Context, token string) (*auth2.UserInfo, error)
	Settings(ctx context.Context) (data.OidcConfig, error)
	Sign(ctx context.Context, input *auth2.UserInfo) (*LoginResponse, error)
}

func NewAuthRepo

func NewAuthRepo(authsvc auth2.Auth, logger mlog.Logger, data data.Data) AuthRepo

type Branch

type Branch struct {
	Name      string `json:"name"`
	IsDefault bool   `json:"is_default"`
	WebURL    string `json:"web_url"`
}

type Changelog

type Changelog struct {
	ID               int
	CreatedAt        time.Time
	UpdatedAt        time.Time
	DeletedAt        *time.Time
	Version          int
	Username         string
	Config           string
	GitBranch        string
	GitCommit        string
	DockerImage      []string
	EnvValues        []*types.KeyValue
	ExtraValues      []*websocket_pb.ExtraValue
	FinalExtraValues []*websocket_pb.ExtraValue
	GitCommitWebURL  string
	GitCommitTitle   string
	GitCommitAuthor  string
	GitCommitDate    *time.Time
	ConfigChanged    bool
	ProjectID        int

	Project *Project
}

func ToChangeLog

func ToChangeLog(c *ent.Changelog) *Changelog

type ChangelogRepo

type ChangelogRepo interface {
	FindLastChangelogsByProjectID(ctx context.Context, input *FindLastChangelogsByProjectIDChangeLogInput) ([]*Changelog, error)
	Create(ctx context.Context, input *CreateChangeLogInput) (*Changelog, error)
	FindLastChangeByProjectID(ctx context.Context, projectID int) (*Changelog, error)
}

func NewChangelogRepo

func NewChangelogRepo(logger mlog.Logger, data data.Data) ChangelogRepo

type CloneRepoInput

type CloneRepoInput struct {
	ID   int
	Name string
}

type ClusterInfo

type ClusterInfo struct {
	// 健康状况
	Status ClusterStatus `json:"status"`

	// 可用内存
	FreeMemory string `json:"free_memory"`
	// 可用 cpu
	FreeCpu string `json:"free_cpu"`

	// 可分配内存
	FreeRequestMemory string `json:"free_request_memory"`
	// 可分配 cpu
	FreeRequestCpu string `json:"free_request_cpu"`

	// 总共的可调度的内存
	TotalMemory string `json:"total_memory"`
	// 总共的可调度的 cpu
	TotalCpu string `json:"total_cpu"`

	// 内存使用率
	UsageMemoryRate string `json:"usage_memory_rate"`
	// cpu 使用率
	UsageCpuRate string `json:"usage_cpu_rate"`

	// 内存分配率
	RequestMemoryRate string `json:"request_memory_rate"`
	// cpu 分配率
	RequestCpuRate string `json:"request_cpu_rate"`
}

type ClusterStatus

type ClusterStatus = string
const (
	StatusBad     ClusterStatus = "bad"
	StatusNotGood ClusterStatus = "not good"
	StatusHealth  ClusterStatus = "health"
)

type Commit

type Commit struct {
	ID             string
	ShortID        string
	AuthorName     string
	AuthorEmail    string
	CommitterName  string
	CommitterEmail string
	Message        string
	Title          string
	WebURL         string
	CreatedAt      *time.Time
	CommittedDate  *time.Time
}

func ToCommit

func ToCommit(v application.Commit) *Commit

type Container

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

type CopyFileToPodInput

type CopyFileToPodInput struct {
	FileId    int64
	Namespace string
	Pod       string
	Container string
}

type CopyFromPodInput

type CopyFromPodInput struct {
	Namespace string
	Pod       string
	Container string
	// pod 内的绝对路径
	FilePath string
	UserName string
}

type CreateChangeLogInput

type CreateChangeLogInput struct {
	Version          int
	Username         string
	Config           string
	GitBranch        string
	GitCommit        string
	DockerImage      []string
	EnvValues        []*types.KeyValue
	ExtraValues      []*websocket_pb.ExtraValue
	FinalExtraValues []*websocket_pb.ExtraValue
	GitCommitWebURL  string
	GitCommitTitle   string
	GitCommitAuthor  string
	GitCommitDate    *time.Time
	ProjectID        int
	ConfigChanged    bool
}

type CreateFileInput

type CreateFileInput struct {
	Path       string
	Username   string
	Size       uint64
	UploadType schematype.UploadType

	Namespace string
	Pod       string
	Container string
}

type CreateNamespaceInput

type CreateNamespaceInput struct {
	Name             string
	ImagePullSecrets []string
	Description      string
	CreatorEmail     string
}

type CreateProjectInput

type CreateProjectInput struct {
	Name         string
	GitProjectID int
	GitBranch    string
	GitCommit    string
	Config       string
	Atomic       *bool
	ConfigType   string
	NamespaceID  int
	PodSelectors []string
	DeployStatus types.Deploy
	RepoID       int
	Creator      string
}

type CreateRepoInput

type CreateRepoInput struct {
	Name         string
	Enabled      bool
	NeedGitRepo  bool
	GitProjectID *int32
	MarsConfig   *mars.Config
	Description  string
}

type CronRepo

type CronRepo interface {
	CleanUploadFiles() error
	FixDeployStatus() error
	DiskInfo() (int64, error)
	CacheAllBranches() error
	SyncImagePullSecrets() error
}

func NewCronRepo

func NewCronRepo(
	logger mlog.Logger,
	fileRepo FileRepo,
	cache cache.Cache,
	repoRepo RepoRepo,
	nsRepo NamespaceRepo,
	k8sRepo K8sRepo,
	pluginMgr application.PluginManger,
	event EventRepo,
	data data.Data,
	up uploader.Uploader,
	helm HelmerRepo,
	gitRepo GitRepo,
	cronManager cron.Manager,
) CronRepo

type DefaultHelmer

type DefaultHelmer struct {
	Debug      bool
	DockerAuth config.DockerAuths
	KubeConfig string
	// contains filtered or unexported fields
}

func (*DefaultHelmer) PackageChart

func (d *DefaultHelmer) PackageChart(path string, destDir string) (string, error)

func (*DefaultHelmer) ReleaseStatus

func (d *DefaultHelmer) ReleaseStatus(releaseName, namespace string) types.Deploy

func (*DefaultHelmer) Rollback

func (d *DefaultHelmer) Rollback(releaseName, namespace string, wait bool, log LogFn, dryRun bool) error

func (*DefaultHelmer) Uninstall

func (d *DefaultHelmer) Uninstall(releaseName, namespace string, log LogFn) error

func (*DefaultHelmer) UpgradeOrInstall

func (d *DefaultHelmer) UpgradeOrInstall(ctx context.Context, releaseName, namespace string, ch *chart.Chart, valueOpts *values.Options, fn WrapLogFn, wait bool, timeoutSeconds int64, dryRun bool, desc string) (*release.Release, error)

type DockerConfig

type DockerConfig map[string]DockerConfigEntry

type DockerConfigEntry

type DockerConfigEntry struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Email    string `json:"email,omitempty"`
	Auth     string `json:"auth,omitempty"`
}

type DockerConfigJSON

type DockerConfigJSON struct {
	Auths       DockerConfig      `json:"auths"`
	HttpHeaders map[string]string `json:"HttpHeaders,omitempty"`
}

type EndpointMapping

type EndpointMapping map[string][]*types.ServiceEndpoint

func (EndpointMapping) AllEndpoints

func (e EndpointMapping) AllEndpoints() []*types.ServiceEndpoint

func (EndpointMapping) Get

func (e EndpointMapping) Get(projName string) []*types.ServiceEndpoint

func (EndpointMapping) Sort

func (e EndpointMapping) Sort()

type EndpointRepo

type EndpointRepo interface {
	InNamespace(ctx context.Context, namespaceID int) (res []*types.ServiceEndpoint, err error)
	InProject(ctx context.Context, projectID int) (res []*types.ServiceEndpoint, err error)
}

func NewEndpointRepo

func NewEndpointRepo(logger mlog.Logger, data data.Data, projRepo ProjectRepo, nsRepo NamespaceRepo) EndpointRepo

type Event

type Event struct {
	ID        int
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time
	Action    types.EventActionType
	Username  string
	Message   string
	Old       string
	New       string
	Duration  string
	FileID    *int
	HasDiff   bool

	File *File
}

func ToEvent

func ToEvent(data *ent.Event) *Event

type EventRepo

type EventRepo interface {
	List(ctx context.Context, input *ListEventInput) (events []*Event, pag *pagination.Pagination, err error)
	Show(ctx context.Context, id int) (*Event, error)
	Dispatch(created event.Event, createdData any)

	// AuditLogWithChange 记录审计日志
	AuditLogWithChange(action types.EventActionType, username string, msg string, oldS, newS YamlPrettier)

	// AuditLog 记录审计日志
	AuditLog(action types.EventActionType, username string, msg string)

	// AuditLogWithRequest grpc审计日志
	AuditLogWithRequest(action types.EventActionType, username string, msg string, req any)

	// FileAuditLog 记录文件审计日志
	FileAuditLog(action types.EventActionType, username string, msg string, fileId int)

	// FileAuditLogWithDuration 记录文件审计日志
	FileAuditLogWithDuration(action types.EventActionType, username string, msg string, fileId int, duration time.Duration)

	HandleAuditLog(data any, e event.Event) error
}

func NewEventRepo

func NewEventRepo(projectRepo ProjectRepo, k8sRepo K8sRepo, pl application.PluginManger, clRepo ChangelogRepo, logger mlog.Logger, data data.Data, eventer event.Dispatcher) EventRepo

type ExecuteInput

type ExecuteInput struct {
	Stdin             io.Reader
	Stdout, Stderr    io.Writer
	TTY               bool
	Cmd               []string
	TerminalSizeQueue remotecommand.TerminalSizeQueue
}

type Executor

type Executor interface {
	WithMethod(method string) Executor
	WithContainer(namespace, pod, container string) Executor
	WithCommand(cmd []string) Executor
	Execute(context.Context, *ExecuteInput) error
}

type ExecutorManager

type ExecutorManager interface {
	New() Executor
	NewFileCopy(maxTries int, errOut io.Writer) k8s.FileCopy
}

func NewExecutorManager

func NewExecutorManager(data data.Data, logger mlog.Logger) ExecutorManager

type Favorite

type Favorite struct {
	ID          int
	NamespaceID int
	Email       string
}

func ToFavorite

func ToFavorite(v *ent.Favorite) *Favorite

type FavoriteNamespaceInput

type FavoriteNamespaceInput struct {
	NamespaceID int
	UserEmail   string
	Favorite    bool
}

type File

type File struct {
	ID            int
	CreatedAt     time.Time
	UpdatedAt     time.Time
	DeletedAt     *time.Time
	UploadType    schematype.UploadType
	Path          string
	Size          uint64
	Username      string
	Namespace     string
	Pod           string
	Container     string
	ContainerPath string

	HumanizeSize string
}

func ToFile

func ToFile(file *ent.File) *File

type FileRepo

type FileRepo interface {
	MaxUploadSize() uint64
	Delete(ctx context.Context, id int) error
	ShowRecords(ctx context.Context, id int) (io.ReadCloser, error)
	DiskInfo(force bool) (int64, error)
	List(ctx context.Context, input *ListFileInput) ([]*File, *pagination.Pagination, error)
	GetByID(ctx context.Context, id int) (*File, error)
	Create(todo context.Context, input *CreateFileInput) (*File, error)
	NewDisk(disk string) uploader.Uploader
	NewFile(fpath string) (uploader.File, error)
	NewRecorder(user *auth.UserInfo, container *Container) Recorder
	Update(ctx context.Context, i *UpdateFileRequest) (*File, error)
	StreamUploadFile(ctx context.Context, input *StreamUploadFileRequest) (*File, error)
}

func NewFileRepo

func NewFileRepo(
	logger mlog.Logger,
	data data.Data,
	cache cache.Cache,
	uploader uploader.Uploader,
	timer timer.Timer,
) FileRepo

type FindLastChangelogsByProjectIDChangeLogInput

type FindLastChangelogsByProjectIDChangeLogInput struct {
	OnlyChanged        bool
	ProjectID          int
	OrderByVersionDesc *bool
	Limit              int
}

type GitProject

type GitProject struct {
	ID            int64  `json:"id"`
	Name          string `json:"name"`
	DefaultBranch string `json:"default_branch"`
	WebURL        string `json:"web_url"`
	Path          string `json:"path"`
	AvatarURL     string `json:"avatar_url"`
	Description   string `json:"description"`
}

func ToGitProject

func ToGitProject(gp application.Project) *GitProject

type GitRepo

type GitRepo interface {
	AllProjects(ctx context.Context, forceFresh bool) (projects []*GitProject, err error)
	AllBranches(ctx context.Context, projectID int, forceFresh bool) (branches []*Branch, err error)
	ListCommits(ctx context.Context, projectID int, branch string) ([]*Commit, error)
	GetCommit(ctx context.Context, projectID int, sha string) (*Commit, error)
	GetCommitPipeline(ctx context.Context, projectID int, branch, sha string) (*Pipeline, error)
	GetByProjectID(ctx context.Context, id int) (project *GitProject, err error)
	GetFileContentWithBranch(ctx context.Context, projectID int, branch, path string) (string, error)
	GetProject(ctx context.Context, id int) (project *GitProject, err error)
	GetChartValuesYaml(ctx context.Context, localChartPath string) (string, error)
}

func NewGitRepo

func NewGitRepo(logger mlog.Logger, cache cache.Cache, pl application.PluginManger, data data.Data) GitRepo

type GrantAccessTokenInput

type GrantAccessTokenInput struct {
	ExpireSeconds int32
	Usage         string
	User          *auth.UserInfo
}

type HelmerRepo

type HelmerRepo interface {
	UpgradeOrInstall(ctx context.Context, releaseName, namespace string, ch *chart.Chart, valueOpts *values.Options, fn WrapLogFn, wait bool, timeoutSeconds int64, dryRun bool, desc string) (*release.Release, error)
	Rollback(releaseName, namespace string, wait bool, log LogFn, dryRun bool) error
	Uninstall(releaseName, namespace string, log LogFn) error
	ReleaseStatus(releaseName, namespace string) types.Deploy
	PackageChart(path string, destDir string) (string, error)
}

func NewDefaultHelmer

func NewDefaultHelmer(k8sRepo K8sRepo, data data.Data, cfg *config.Config, logger mlog.Logger) HelmerRepo

type K8sRepo

type K8sRepo interface {
	SplitManifests(manifest string) []string
	AddTlsSecret(ns string, name string, key string, crt string) (*corev1.Secret, error)
	GetPodMetrics(ctx context.Context, namespace, podName string) (*v1beta1.PodMetrics, error)
	CreateDockerSecret(ctx context.Context, namespace string) (*corev1.Secret, error)
	GetNamespace(ctx context.Context, name string) (*corev1.Namespace, error)
	CreateNamespace(ctx context.Context, name string) (*corev1.Namespace, error)
	LogStream(ctx context.Context, namespace, pod, container string) (chan []byte, error)
	GetPodLogs(ctx context.Context, namespace, podName string, options *corev1.PodLogOptions) (string, error)
	FindDefaultContainer(ctx context.Context, namespace string, pod string) (string, error)
	GetPod(namespace, podName string) (*corev1.Pod, error)
	ListEvents(namespace string) ([]*eventv1.Event, error)
	IsPodRunning(namespace, podName string) (running bool, notRunningReason string)
	GetPodSelectorsByManifest(manifests []string) []string
	GetCpuAndMemoryInNamespace(ctx context.Context, namespace string) (string, string)
	GetCpuAndMemory(ctx context.Context, list []v1beta1.PodMetrics) (string, string)
	GetCpuAndMemoryQuantity(pod v1beta1.PodMetrics) (cpu *resource.Quantity, memory *resource.Quantity)
	ClusterInfo() *ClusterInfo

	Execute(ctx context.Context, c *Container, input *ExecuteInput) error
	DeleteSecret(ctx context.Context, namespace, secret string) error
	DeleteNamespace(ctx context.Context, name string) error

	GetAllPodMetrics(ctx context.Context, proj *Project) []v1beta1.PodMetrics

	CopyFileToPod(ctx context.Context, input *CopyFileToPodInput) (*File, error)
	CopyFromPod(ctx context.Context, input *CopyFromPodInput) (*File, error)
}

func NewK8sRepo

func NewK8sRepo(
	logger mlog.Logger,
	timer timer.Timer,
	data data.Data,
	fileRepo FileRepo,
	uploader uploader.Uploader,
	archiver Archiver,
	remoteExecutor ExecutorManager,
) K8sRepo

type ListAccessTokenInput

type ListAccessTokenInput struct {
	Page, PageSize int32
	WithSoftDelete bool
	Email          string
}

type ListEventInput

type ListEventInput struct {
	Page, PageSize int32
	ActionType     types.EventActionType
	Search         string
	OrderIDDesc    *bool
}

type ListFileInput

type ListFileInput struct {
	Page, PageSize int32
	OrderIDDesc    *bool
	WithSoftDelete bool
}

type ListNamespaceInput

type ListNamespaceInput struct {
	Favorite bool
	Email    string
	Page     int32
	PageSize int32
	Name     *string
	IsAdmin  bool
}

type ListProjectInput

type ListProjectInput struct {
	Page          int32
	PageSize      int32
	OrderByIDDesc *bool
}

type ListReleaseItem

type ListReleaseItem struct {
	Release *release.Release
	Status  string
}

type ListRepoRequest

type ListRepoRequest struct {
	Page, PageSize int32
	Enabled        *bool
	OrderByIDDesc  *bool
	Name           string
}

type LogFn

type LogFn func(format string, v ...any)

type LoginInput

type LoginInput struct {
	Username string
	Password string
}

type LoginResponse

type LoginResponse struct {
	Token     string
	ExpiredIn int64

	UserInfo *auth2.UserInfo
}

type Member

type Member struct {
	ID          int
	NamespaceID int
	Email       string
}

func ToMember

func ToMember(v *ent.Member) *Member

type MockAccessTokenRepo

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

MockAccessTokenRepo is a mock of AccessTokenRepo interface.

func NewMockAccessTokenRepo

func NewMockAccessTokenRepo(ctrl *gomock.Controller) *MockAccessTokenRepo

NewMockAccessTokenRepo creates a new mock instance.

func (*MockAccessTokenRepo) EXPECT

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

func (*MockAccessTokenRepo) Grant

Grant mocks base method.

func (*MockAccessTokenRepo) Lease

func (m *MockAccessTokenRepo) Lease(arg0 context.Context, arg1 string, arg2 int32) (*AccessToken, error)

Lease mocks base method.

func (*MockAccessTokenRepo) List

List mocks base method.

func (*MockAccessTokenRepo) Revoke

func (m *MockAccessTokenRepo) Revoke(arg0 context.Context, arg1 string) error

Revoke mocks base method.

type MockAccessTokenRepoMockRecorder

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

MockAccessTokenRepoMockRecorder is the mock recorder for MockAccessTokenRepo.

func (*MockAccessTokenRepoMockRecorder) Grant

func (mr *MockAccessTokenRepoMockRecorder) Grant(arg0, arg1 any) *gomock.Call

Grant indicates an expected call of Grant.

func (*MockAccessTokenRepoMockRecorder) Lease

func (mr *MockAccessTokenRepoMockRecorder) Lease(arg0, arg1, arg2 any) *gomock.Call

Lease indicates an expected call of Lease.

func (*MockAccessTokenRepoMockRecorder) List

func (mr *MockAccessTokenRepoMockRecorder) List(arg0, arg1 any) *gomock.Call

List indicates an expected call of List.

func (*MockAccessTokenRepoMockRecorder) Revoke

func (mr *MockAccessTokenRepoMockRecorder) Revoke(arg0, arg1 any) *gomock.Call

Revoke indicates an expected call of Revoke.

type MockAuthRepo

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

MockAuthRepo is a mock of AuthRepo interface.

func NewMockAuthRepo

func NewMockAuthRepo(ctrl *gomock.Controller) *MockAuthRepo

NewMockAuthRepo creates a new mock instance.

func (*MockAuthRepo) EXPECT

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

func (*MockAuthRepo) Login

func (m *MockAuthRepo) Login(arg0 context.Context, arg1 *LoginInput) (*LoginResponse, error)

Login mocks base method.

func (*MockAuthRepo) Settings

func (m *MockAuthRepo) Settings(arg0 context.Context) (data.OidcConfig, error)

Settings mocks base method.

func (*MockAuthRepo) Sign

Sign mocks base method.

func (*MockAuthRepo) VerifyToken

func (m *MockAuthRepo) VerifyToken(arg0 context.Context, arg1 string) (*schematype.UserInfo, error)

VerifyToken mocks base method.

type MockAuthRepoMockRecorder

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

MockAuthRepoMockRecorder is the mock recorder for MockAuthRepo.

func (*MockAuthRepoMockRecorder) Login

func (mr *MockAuthRepoMockRecorder) Login(arg0, arg1 any) *gomock.Call

Login indicates an expected call of Login.

func (*MockAuthRepoMockRecorder) Settings

func (mr *MockAuthRepoMockRecorder) Settings(arg0 any) *gomock.Call

Settings indicates an expected call of Settings.

func (*MockAuthRepoMockRecorder) Sign

func (mr *MockAuthRepoMockRecorder) Sign(arg0, arg1 any) *gomock.Call

Sign indicates an expected call of Sign.

func (*MockAuthRepoMockRecorder) VerifyToken

func (mr *MockAuthRepoMockRecorder) VerifyToken(arg0, arg1 any) *gomock.Call

VerifyToken indicates an expected call of VerifyToken.

type MockChangelogRepo

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

MockChangelogRepo is a mock of ChangelogRepo interface.

func NewMockChangelogRepo

func NewMockChangelogRepo(ctrl *gomock.Controller) *MockChangelogRepo

NewMockChangelogRepo creates a new mock instance.

func (*MockChangelogRepo) Create

Create mocks base method.

func (*MockChangelogRepo) EXPECT

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

func (*MockChangelogRepo) FindLastChangeByProjectID

func (m *MockChangelogRepo) FindLastChangeByProjectID(arg0 context.Context, arg1 int) (*Changelog, error)

FindLastChangeByProjectID mocks base method.

func (*MockChangelogRepo) FindLastChangelogsByProjectID

func (m *MockChangelogRepo) FindLastChangelogsByProjectID(arg0 context.Context, arg1 *FindLastChangelogsByProjectIDChangeLogInput) ([]*Changelog, error)

FindLastChangelogsByProjectID mocks base method.

type MockChangelogRepoMockRecorder

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

MockChangelogRepoMockRecorder is the mock recorder for MockChangelogRepo.

func (*MockChangelogRepoMockRecorder) Create

func (mr *MockChangelogRepoMockRecorder) Create(arg0, arg1 any) *gomock.Call

Create indicates an expected call of Create.

func (*MockChangelogRepoMockRecorder) FindLastChangeByProjectID

func (mr *MockChangelogRepoMockRecorder) FindLastChangeByProjectID(arg0, arg1 any) *gomock.Call

FindLastChangeByProjectID indicates an expected call of FindLastChangeByProjectID.

func (*MockChangelogRepoMockRecorder) FindLastChangelogsByProjectID

func (mr *MockChangelogRepoMockRecorder) FindLastChangelogsByProjectID(arg0, arg1 any) *gomock.Call

FindLastChangelogsByProjectID indicates an expected call of FindLastChangelogsByProjectID.

type MockEndpointRepo

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

MockEndpointRepo is a mock of EndpointRepo interface.

func NewMockEndpointRepo

func NewMockEndpointRepo(ctrl *gomock.Controller) *MockEndpointRepo

NewMockEndpointRepo creates a new mock instance.

func (*MockEndpointRepo) EXPECT

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

func (*MockEndpointRepo) InNamespace

func (m *MockEndpointRepo) InNamespace(arg0 context.Context, arg1 int) ([]*types.ServiceEndpoint, error)

InNamespace mocks base method.

func (*MockEndpointRepo) InProject

func (m *MockEndpointRepo) InProject(arg0 context.Context, arg1 int) ([]*types.ServiceEndpoint, error)

InProject mocks base method.

type MockEndpointRepoMockRecorder

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

MockEndpointRepoMockRecorder is the mock recorder for MockEndpointRepo.

func (*MockEndpointRepoMockRecorder) InNamespace

func (mr *MockEndpointRepoMockRecorder) InNamespace(arg0, arg1 any) *gomock.Call

InNamespace indicates an expected call of InNamespace.

func (*MockEndpointRepoMockRecorder) InProject

func (mr *MockEndpointRepoMockRecorder) InProject(arg0, arg1 any) *gomock.Call

InProject indicates an expected call of InProject.

type MockEventRepo

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

MockEventRepo is a mock of EventRepo interface.

func NewMockEventRepo

func NewMockEventRepo(ctrl *gomock.Controller) *MockEventRepo

NewMockEventRepo creates a new mock instance.

func (*MockEventRepo) AuditLog

func (m *MockEventRepo) AuditLog(arg0 types.EventActionType, arg1, arg2 string)

AuditLog mocks base method.

func (*MockEventRepo) AuditLogWithChange

func (m *MockEventRepo) AuditLogWithChange(arg0 types.EventActionType, arg1, arg2 string, arg3, arg4 YamlPrettier)

AuditLogWithChange mocks base method.

func (*MockEventRepo) AuditLogWithRequest

func (m *MockEventRepo) AuditLogWithRequest(arg0 types.EventActionType, arg1, arg2 string, arg3 any)

AuditLogWithRequest mocks base method.

func (*MockEventRepo) Dispatch

func (m *MockEventRepo) Dispatch(arg0 event.Event, arg1 any)

Dispatch mocks base method.

func (*MockEventRepo) EXPECT

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

func (*MockEventRepo) FileAuditLog

func (m *MockEventRepo) FileAuditLog(arg0 types.EventActionType, arg1, arg2 string, arg3 int)

FileAuditLog mocks base method.

func (*MockEventRepo) FileAuditLogWithDuration

func (m *MockEventRepo) FileAuditLogWithDuration(arg0 types.EventActionType, arg1, arg2 string, arg3 int, arg4 time.Duration)

FileAuditLogWithDuration mocks base method.

func (*MockEventRepo) HandleAuditLog

func (m *MockEventRepo) HandleAuditLog(arg0 any, arg1 event.Event) error

HandleAuditLog mocks base method.

func (*MockEventRepo) List

List mocks base method.

func (*MockEventRepo) Show

func (m *MockEventRepo) Show(arg0 context.Context, arg1 int) (*Event, error)

Show mocks base method.

type MockEventRepoMockRecorder

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

MockEventRepoMockRecorder is the mock recorder for MockEventRepo.

func (*MockEventRepoMockRecorder) AuditLog

func (mr *MockEventRepoMockRecorder) AuditLog(arg0, arg1, arg2 any) *gomock.Call

AuditLog indicates an expected call of AuditLog.

func (*MockEventRepoMockRecorder) AuditLogWithChange

func (mr *MockEventRepoMockRecorder) AuditLogWithChange(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call

AuditLogWithChange indicates an expected call of AuditLogWithChange.

func (*MockEventRepoMockRecorder) AuditLogWithRequest

func (mr *MockEventRepoMockRecorder) AuditLogWithRequest(arg0, arg1, arg2, arg3 any) *gomock.Call

AuditLogWithRequest indicates an expected call of AuditLogWithRequest.

func (*MockEventRepoMockRecorder) Dispatch

func (mr *MockEventRepoMockRecorder) Dispatch(arg0, arg1 any) *gomock.Call

Dispatch indicates an expected call of Dispatch.

func (*MockEventRepoMockRecorder) FileAuditLog

func (mr *MockEventRepoMockRecorder) FileAuditLog(arg0, arg1, arg2, arg3 any) *gomock.Call

FileAuditLog indicates an expected call of FileAuditLog.

func (*MockEventRepoMockRecorder) FileAuditLogWithDuration

func (mr *MockEventRepoMockRecorder) FileAuditLogWithDuration(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call

FileAuditLogWithDuration indicates an expected call of FileAuditLogWithDuration.

func (*MockEventRepoMockRecorder) HandleAuditLog

func (mr *MockEventRepoMockRecorder) HandleAuditLog(arg0, arg1 any) *gomock.Call

HandleAuditLog indicates an expected call of HandleAuditLog.

func (*MockEventRepoMockRecorder) List

func (mr *MockEventRepoMockRecorder) List(arg0, arg1 any) *gomock.Call

List indicates an expected call of List.

func (*MockEventRepoMockRecorder) Show

func (mr *MockEventRepoMockRecorder) Show(arg0, arg1 any) *gomock.Call

Show indicates an expected call of Show.

type MockExecutor

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

MockExecutor is a mock of Executor interface.

func NewMockExecutor

func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor

NewMockExecutor creates a new mock instance.

func (*MockExecutor) EXPECT

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

func (*MockExecutor) Execute

func (m *MockExecutor) Execute(arg0 context.Context, arg1 *ExecuteInput) error

Execute mocks base method.

func (*MockExecutor) WithCommand

func (m *MockExecutor) WithCommand(arg0 []string) Executor

WithCommand mocks base method.

func (*MockExecutor) WithContainer

func (m *MockExecutor) WithContainer(arg0, arg1, arg2 string) Executor

WithContainer mocks base method.

func (*MockExecutor) WithMethod

func (m *MockExecutor) WithMethod(arg0 string) Executor

WithMethod mocks base method.

type MockExecutorManager

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

MockExecutorManager is a mock of ExecutorManager interface.

func NewMockExecutorManager

func NewMockExecutorManager(ctrl *gomock.Controller) *MockExecutorManager

NewMockExecutorManager creates a new mock instance.

func (*MockExecutorManager) EXPECT

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

func (*MockExecutorManager) New

func (m *MockExecutorManager) New() Executor

New mocks base method.

func (*MockExecutorManager) NewFileCopy

func (m *MockExecutorManager) NewFileCopy(arg0 int, arg1 io.Writer) k8s.FileCopy

NewFileCopy mocks base method.

type MockExecutorManagerMockRecorder

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

MockExecutorManagerMockRecorder is the mock recorder for MockExecutorManager.

func (*MockExecutorManagerMockRecorder) New

New indicates an expected call of New.

func (*MockExecutorManagerMockRecorder) NewFileCopy

func (mr *MockExecutorManagerMockRecorder) NewFileCopy(arg0, arg1 any) *gomock.Call

NewFileCopy indicates an expected call of NewFileCopy.

type MockExecutorMockRecorder

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

MockExecutorMockRecorder is the mock recorder for MockExecutor.

func (*MockExecutorMockRecorder) Execute

func (mr *MockExecutorMockRecorder) Execute(arg0, arg1 any) *gomock.Call

Execute indicates an expected call of Execute.

func (*MockExecutorMockRecorder) WithCommand

func (mr *MockExecutorMockRecorder) WithCommand(arg0 any) *gomock.Call

WithCommand indicates an expected call of WithCommand.

func (*MockExecutorMockRecorder) WithContainer

func (mr *MockExecutorMockRecorder) WithContainer(arg0, arg1, arg2 any) *gomock.Call

WithContainer indicates an expected call of WithContainer.

func (*MockExecutorMockRecorder) WithMethod

func (mr *MockExecutorMockRecorder) WithMethod(arg0 any) *gomock.Call

WithMethod indicates an expected call of WithMethod.

type MockFileRepo

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

MockFileRepo is a mock of FileRepo interface.

func NewMockFileRepo

func NewMockFileRepo(ctrl *gomock.Controller) *MockFileRepo

NewMockFileRepo creates a new mock instance.

func (*MockFileRepo) Create

func (m *MockFileRepo) Create(arg0 context.Context, arg1 *CreateFileInput) (*File, error)

Create mocks base method.

func (*MockFileRepo) Delete

func (m *MockFileRepo) Delete(arg0 context.Context, arg1 int) error

Delete mocks base method.

func (*MockFileRepo) DiskInfo

func (m *MockFileRepo) DiskInfo(arg0 bool) (int64, error)

DiskInfo mocks base method.

func (*MockFileRepo) EXPECT

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

func (*MockFileRepo) GetByID

func (m *MockFileRepo) GetByID(arg0 context.Context, arg1 int) (*File, error)

GetByID mocks base method.

func (*MockFileRepo) List

List mocks base method.

func (*MockFileRepo) MaxUploadSize

func (m *MockFileRepo) MaxUploadSize() uint64

MaxUploadSize mocks base method.

func (*MockFileRepo) NewDisk

func (m *MockFileRepo) NewDisk(arg0 string) uploader.Uploader

NewDisk mocks base method.

func (*MockFileRepo) NewFile

func (m *MockFileRepo) NewFile(arg0 string) (uploader.File, error)

NewFile mocks base method.

func (*MockFileRepo) NewRecorder

func (m *MockFileRepo) NewRecorder(arg0 *schematype.UserInfo, arg1 *Container) Recorder

NewRecorder mocks base method.

func (*MockFileRepo) ShowRecords

func (m *MockFileRepo) ShowRecords(arg0 context.Context, arg1 int) (io.ReadCloser, error)

ShowRecords mocks base method.

func (*MockFileRepo) StreamUploadFile

func (m *MockFileRepo) StreamUploadFile(arg0 context.Context, arg1 *StreamUploadFileRequest) (*File, error)

StreamUploadFile mocks base method.

func (*MockFileRepo) Update

func (m *MockFileRepo) Update(arg0 context.Context, arg1 *UpdateFileRequest) (*File, error)

Update mocks base method.

type MockFileRepoMockRecorder

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

MockFileRepoMockRecorder is the mock recorder for MockFileRepo.

func (*MockFileRepoMockRecorder) Create

func (mr *MockFileRepoMockRecorder) Create(arg0, arg1 any) *gomock.Call

Create indicates an expected call of Create.

func (*MockFileRepoMockRecorder) Delete

func (mr *MockFileRepoMockRecorder) Delete(arg0, arg1 any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockFileRepoMockRecorder) DiskInfo

func (mr *MockFileRepoMockRecorder) DiskInfo(arg0 any) *gomock.Call

DiskInfo indicates an expected call of DiskInfo.

func (*MockFileRepoMockRecorder) GetByID

func (mr *MockFileRepoMockRecorder) GetByID(arg0, arg1 any) *gomock.Call

GetByID indicates an expected call of GetByID.

func (*MockFileRepoMockRecorder) List

func (mr *MockFileRepoMockRecorder) List(arg0, arg1 any) *gomock.Call

List indicates an expected call of List.

func (*MockFileRepoMockRecorder) MaxUploadSize

func (mr *MockFileRepoMockRecorder) MaxUploadSize() *gomock.Call

MaxUploadSize indicates an expected call of MaxUploadSize.

func (*MockFileRepoMockRecorder) NewDisk

func (mr *MockFileRepoMockRecorder) NewDisk(arg0 any) *gomock.Call

NewDisk indicates an expected call of NewDisk.

func (*MockFileRepoMockRecorder) NewFile

func (mr *MockFileRepoMockRecorder) NewFile(arg0 any) *gomock.Call

NewFile indicates an expected call of NewFile.

func (*MockFileRepoMockRecorder) NewRecorder

func (mr *MockFileRepoMockRecorder) NewRecorder(arg0, arg1 any) *gomock.Call

NewRecorder indicates an expected call of NewRecorder.

func (*MockFileRepoMockRecorder) ShowRecords

func (mr *MockFileRepoMockRecorder) ShowRecords(arg0, arg1 any) *gomock.Call

ShowRecords indicates an expected call of ShowRecords.

func (*MockFileRepoMockRecorder) StreamUploadFile

func (mr *MockFileRepoMockRecorder) StreamUploadFile(arg0, arg1 any) *gomock.Call

StreamUploadFile indicates an expected call of StreamUploadFile.

func (*MockFileRepoMockRecorder) Update

func (mr *MockFileRepoMockRecorder) Update(arg0, arg1 any) *gomock.Call

Update indicates an expected call of Update.

type MockGitRepo

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

MockGitRepo is a mock of GitRepo interface.

func NewMockGitRepo

func NewMockGitRepo(ctrl *gomock.Controller) *MockGitRepo

NewMockGitRepo creates a new mock instance.

func (*MockGitRepo) AllBranches

func (m *MockGitRepo) AllBranches(arg0 context.Context, arg1 int, arg2 bool) ([]*Branch, error)

AllBranches mocks base method.

func (*MockGitRepo) AllProjects

func (m *MockGitRepo) AllProjects(arg0 context.Context, arg1 bool) ([]*GitProject, error)

AllProjects mocks base method.

func (*MockGitRepo) EXPECT

func (m *MockGitRepo) EXPECT() *MockGitRepoMockRecorder

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

func (*MockGitRepo) GetByProjectID

func (m *MockGitRepo) GetByProjectID(arg0 context.Context, arg1 int) (*GitProject, error)

GetByProjectID mocks base method.

func (*MockGitRepo) GetChartValuesYaml

func (m *MockGitRepo) GetChartValuesYaml(arg0 context.Context, arg1 string) (string, error)

GetChartValuesYaml mocks base method.

func (*MockGitRepo) GetCommit

func (m *MockGitRepo) GetCommit(arg0 context.Context, arg1 int, arg2 string) (*Commit, error)

GetCommit mocks base method.

func (*MockGitRepo) GetCommitPipeline

func (m *MockGitRepo) GetCommitPipeline(arg0 context.Context, arg1 int, arg2, arg3 string) (*Pipeline, error)

GetCommitPipeline mocks base method.

func (*MockGitRepo) GetFileContentWithBranch

func (m *MockGitRepo) GetFileContentWithBranch(arg0 context.Context, arg1 int, arg2, arg3 string) (string, error)

GetFileContentWithBranch mocks base method.

func (*MockGitRepo) GetProject

func (m *MockGitRepo) GetProject(arg0 context.Context, arg1 int) (*GitProject, error)

GetProject mocks base method.

func (*MockGitRepo) ListCommits

func (m *MockGitRepo) ListCommits(arg0 context.Context, arg1 int, arg2 string) ([]*Commit, error)

ListCommits mocks base method.

type MockGitRepoMockRecorder

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

MockGitRepoMockRecorder is the mock recorder for MockGitRepo.

func (*MockGitRepoMockRecorder) AllBranches

func (mr *MockGitRepoMockRecorder) AllBranches(arg0, arg1, arg2 any) *gomock.Call

AllBranches indicates an expected call of AllBranches.

func (*MockGitRepoMockRecorder) AllProjects

func (mr *MockGitRepoMockRecorder) AllProjects(arg0, arg1 any) *gomock.Call

AllProjects indicates an expected call of AllProjects.

func (*MockGitRepoMockRecorder) GetByProjectID

func (mr *MockGitRepoMockRecorder) GetByProjectID(arg0, arg1 any) *gomock.Call

GetByProjectID indicates an expected call of GetByProjectID.

func (*MockGitRepoMockRecorder) GetChartValuesYaml

func (mr *MockGitRepoMockRecorder) GetChartValuesYaml(arg0, arg1 any) *gomock.Call

GetChartValuesYaml indicates an expected call of GetChartValuesYaml.

func (*MockGitRepoMockRecorder) GetCommit

func (mr *MockGitRepoMockRecorder) GetCommit(arg0, arg1, arg2 any) *gomock.Call

GetCommit indicates an expected call of GetCommit.

func (*MockGitRepoMockRecorder) GetCommitPipeline

func (mr *MockGitRepoMockRecorder) GetCommitPipeline(arg0, arg1, arg2, arg3 any) *gomock.Call

GetCommitPipeline indicates an expected call of GetCommitPipeline.

func (*MockGitRepoMockRecorder) GetFileContentWithBranch

func (mr *MockGitRepoMockRecorder) GetFileContentWithBranch(arg0, arg1, arg2, arg3 any) *gomock.Call

GetFileContentWithBranch indicates an expected call of GetFileContentWithBranch.

func (*MockGitRepoMockRecorder) GetProject

func (mr *MockGitRepoMockRecorder) GetProject(arg0, arg1 any) *gomock.Call

GetProject indicates an expected call of GetProject.

func (*MockGitRepoMockRecorder) ListCommits

func (mr *MockGitRepoMockRecorder) ListCommits(arg0, arg1, arg2 any) *gomock.Call

ListCommits indicates an expected call of ListCommits.

type MockHelmerRepo

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

MockHelmerRepo is a mock of HelmerRepo interface.

func NewMockHelmerRepo

func NewMockHelmerRepo(ctrl *gomock.Controller) *MockHelmerRepo

NewMockHelmerRepo creates a new mock instance.

func (*MockHelmerRepo) EXPECT

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

func (*MockHelmerRepo) PackageChart

func (m *MockHelmerRepo) PackageChart(arg0, arg1 string) (string, error)

PackageChart mocks base method.

func (*MockHelmerRepo) ReleaseStatus

func (m *MockHelmerRepo) ReleaseStatus(arg0, arg1 string) types.Deploy

ReleaseStatus mocks base method.

func (*MockHelmerRepo) Rollback

func (m *MockHelmerRepo) Rollback(arg0, arg1 string, arg2 bool, arg3 LogFn, arg4 bool) error

Rollback mocks base method.

func (*MockHelmerRepo) Uninstall

func (m *MockHelmerRepo) Uninstall(arg0, arg1 string, arg2 LogFn) error

Uninstall mocks base method.

func (*MockHelmerRepo) UpgradeOrInstall

func (m *MockHelmerRepo) UpgradeOrInstall(arg0 context.Context, arg1, arg2 string, arg3 *chart.Chart, arg4 *values.Options, arg5 WrapLogFn, arg6 bool, arg7 int64, arg8 bool, arg9 string) (*release.Release, error)

UpgradeOrInstall mocks base method.

type MockHelmerRepoMockRecorder

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

MockHelmerRepoMockRecorder is the mock recorder for MockHelmerRepo.

func (*MockHelmerRepoMockRecorder) PackageChart

func (mr *MockHelmerRepoMockRecorder) PackageChart(arg0, arg1 any) *gomock.Call

PackageChart indicates an expected call of PackageChart.

func (*MockHelmerRepoMockRecorder) ReleaseStatus

func (mr *MockHelmerRepoMockRecorder) ReleaseStatus(arg0, arg1 any) *gomock.Call

ReleaseStatus indicates an expected call of ReleaseStatus.

func (*MockHelmerRepoMockRecorder) Rollback

func (mr *MockHelmerRepoMockRecorder) Rollback(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call

Rollback indicates an expected call of Rollback.

func (*MockHelmerRepoMockRecorder) Uninstall

func (mr *MockHelmerRepoMockRecorder) Uninstall(arg0, arg1, arg2 any) *gomock.Call

Uninstall indicates an expected call of Uninstall.

func (*MockHelmerRepoMockRecorder) UpgradeOrInstall

func (mr *MockHelmerRepoMockRecorder) UpgradeOrInstall(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 any) *gomock.Call

UpgradeOrInstall indicates an expected call of UpgradeOrInstall.

type MockK8sRepo

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

MockK8sRepo is a mock of K8sRepo interface.

func NewMockK8sRepo

func NewMockK8sRepo(ctrl *gomock.Controller) *MockK8sRepo

NewMockK8sRepo creates a new mock instance.

func (*MockK8sRepo) AddTlsSecret

func (m *MockK8sRepo) AddTlsSecret(arg0, arg1, arg2, arg3 string) (*v1.Secret, error)

AddTlsSecret mocks base method.

func (*MockK8sRepo) ClusterInfo

func (m *MockK8sRepo) ClusterInfo() *ClusterInfo

ClusterInfo mocks base method.

func (*MockK8sRepo) CopyFileToPod

func (m *MockK8sRepo) CopyFileToPod(arg0 context.Context, arg1 *CopyFileToPodInput) (*File, error)

CopyFileToPod mocks base method.

func (*MockK8sRepo) CopyFromPod

func (m *MockK8sRepo) CopyFromPod(arg0 context.Context, arg1 *CopyFromPodInput) (*File, error)

CopyFromPod mocks base method.

func (*MockK8sRepo) CreateDockerSecret

func (m *MockK8sRepo) CreateDockerSecret(arg0 context.Context, arg1 string) (*v1.Secret, error)

CreateDockerSecret mocks base method.

func (*MockK8sRepo) CreateNamespace

func (m *MockK8sRepo) CreateNamespace(arg0 context.Context, arg1 string) (*v1.Namespace, error)

CreateNamespace mocks base method.

func (*MockK8sRepo) DeleteNamespace

func (m *MockK8sRepo) DeleteNamespace(arg0 context.Context, arg1 string) error

DeleteNamespace mocks base method.

func (*MockK8sRepo) DeleteSecret

func (m *MockK8sRepo) DeleteSecret(arg0 context.Context, arg1, arg2 string) error

DeleteSecret mocks base method.

func (*MockK8sRepo) EXPECT

func (m *MockK8sRepo) EXPECT() *MockK8sRepoMockRecorder

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

func (*MockK8sRepo) Execute

func (m *MockK8sRepo) Execute(arg0 context.Context, arg1 *Container, arg2 *ExecuteInput) error

Execute mocks base method.

func (*MockK8sRepo) FindDefaultContainer

func (m *MockK8sRepo) FindDefaultContainer(arg0 context.Context, arg1, arg2 string) (string, error)

FindDefaultContainer mocks base method.

func (*MockK8sRepo) GetAllPodMetrics

func (m *MockK8sRepo) GetAllPodMetrics(arg0 context.Context, arg1 *Project) []v1beta1.PodMetrics

GetAllPodMetrics mocks base method.

func (*MockK8sRepo) GetCpuAndMemory

func (m *MockK8sRepo) GetCpuAndMemory(arg0 context.Context, arg1 []v1beta1.PodMetrics) (string, string)

GetCpuAndMemory mocks base method.

func (*MockK8sRepo) GetCpuAndMemoryInNamespace

func (m *MockK8sRepo) GetCpuAndMemoryInNamespace(arg0 context.Context, arg1 string) (string, string)

GetCpuAndMemoryInNamespace mocks base method.

func (*MockK8sRepo) GetCpuAndMemoryQuantity

func (m *MockK8sRepo) GetCpuAndMemoryQuantity(arg0 v1beta1.PodMetrics) (*resource.Quantity, *resource.Quantity)

GetCpuAndMemoryQuantity mocks base method.

func (*MockK8sRepo) GetNamespace

func (m *MockK8sRepo) GetNamespace(arg0 context.Context, arg1 string) (*v1.Namespace, error)

GetNamespace mocks base method.

func (*MockK8sRepo) GetPod

func (m *MockK8sRepo) GetPod(arg0, arg1 string) (*v1.Pod, error)

GetPod mocks base method.

func (*MockK8sRepo) GetPodLogs

func (m *MockK8sRepo) GetPodLogs(arg0 context.Context, arg1, arg2 string, arg3 *v1.PodLogOptions) (string, error)

GetPodLogs mocks base method.

func (*MockK8sRepo) GetPodMetrics

func (m *MockK8sRepo) GetPodMetrics(arg0 context.Context, arg1, arg2 string) (*v1beta1.PodMetrics, error)

GetPodMetrics mocks base method.

func (*MockK8sRepo) GetPodSelectorsByManifest

func (m *MockK8sRepo) GetPodSelectorsByManifest(arg0 []string) []string

GetPodSelectorsByManifest mocks base method.

func (*MockK8sRepo) IsPodRunning

func (m *MockK8sRepo) IsPodRunning(arg0, arg1 string) (bool, string)

IsPodRunning mocks base method.

func (*MockK8sRepo) ListEvents

func (m *MockK8sRepo) ListEvents(arg0 string) ([]*v10.Event, error)

ListEvents mocks base method.

func (*MockK8sRepo) LogStream

func (m *MockK8sRepo) LogStream(arg0 context.Context, arg1, arg2, arg3 string) (chan []byte, error)

LogStream mocks base method.

func (*MockK8sRepo) SplitManifests

func (m *MockK8sRepo) SplitManifests(arg0 string) []string

SplitManifests mocks base method.

type MockK8sRepoMockRecorder

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

MockK8sRepoMockRecorder is the mock recorder for MockK8sRepo.

func (*MockK8sRepoMockRecorder) AddTlsSecret

func (mr *MockK8sRepoMockRecorder) AddTlsSecret(arg0, arg1, arg2, arg3 any) *gomock.Call

AddTlsSecret indicates an expected call of AddTlsSecret.

func (*MockK8sRepoMockRecorder) ClusterInfo

func (mr *MockK8sRepoMockRecorder) ClusterInfo() *gomock.Call

ClusterInfo indicates an expected call of ClusterInfo.

func (*MockK8sRepoMockRecorder) CopyFileToPod

func (mr *MockK8sRepoMockRecorder) CopyFileToPod(arg0, arg1 any) *gomock.Call

CopyFileToPod indicates an expected call of CopyFileToPod.

func (*MockK8sRepoMockRecorder) CopyFromPod

func (mr *MockK8sRepoMockRecorder) CopyFromPod(arg0, arg1 any) *gomock.Call

CopyFromPod indicates an expected call of CopyFromPod.

func (*MockK8sRepoMockRecorder) CreateDockerSecret

func (mr *MockK8sRepoMockRecorder) CreateDockerSecret(arg0, arg1 any) *gomock.Call

CreateDockerSecret indicates an expected call of CreateDockerSecret.

func (*MockK8sRepoMockRecorder) CreateNamespace

func (mr *MockK8sRepoMockRecorder) CreateNamespace(arg0, arg1 any) *gomock.Call

CreateNamespace indicates an expected call of CreateNamespace.

func (*MockK8sRepoMockRecorder) DeleteNamespace

func (mr *MockK8sRepoMockRecorder) DeleteNamespace(arg0, arg1 any) *gomock.Call

DeleteNamespace indicates an expected call of DeleteNamespace.

func (*MockK8sRepoMockRecorder) DeleteSecret

func (mr *MockK8sRepoMockRecorder) DeleteSecret(arg0, arg1, arg2 any) *gomock.Call

DeleteSecret indicates an expected call of DeleteSecret.

func (*MockK8sRepoMockRecorder) Execute

func (mr *MockK8sRepoMockRecorder) Execute(arg0, arg1, arg2 any) *gomock.Call

Execute indicates an expected call of Execute.

func (*MockK8sRepoMockRecorder) FindDefaultContainer

func (mr *MockK8sRepoMockRecorder) FindDefaultContainer(arg0, arg1, arg2 any) *gomock.Call

FindDefaultContainer indicates an expected call of FindDefaultContainer.

func (*MockK8sRepoMockRecorder) GetAllPodMetrics

func (mr *MockK8sRepoMockRecorder) GetAllPodMetrics(arg0, arg1 any) *gomock.Call

GetAllPodMetrics indicates an expected call of GetAllPodMetrics.

func (*MockK8sRepoMockRecorder) GetCpuAndMemory

func (mr *MockK8sRepoMockRecorder) GetCpuAndMemory(arg0, arg1 any) *gomock.Call

GetCpuAndMemory indicates an expected call of GetCpuAndMemory.

func (*MockK8sRepoMockRecorder) GetCpuAndMemoryInNamespace

func (mr *MockK8sRepoMockRecorder) GetCpuAndMemoryInNamespace(arg0, arg1 any) *gomock.Call

GetCpuAndMemoryInNamespace indicates an expected call of GetCpuAndMemoryInNamespace.

func (*MockK8sRepoMockRecorder) GetCpuAndMemoryQuantity

func (mr *MockK8sRepoMockRecorder) GetCpuAndMemoryQuantity(arg0 any) *gomock.Call

GetCpuAndMemoryQuantity indicates an expected call of GetCpuAndMemoryQuantity.

func (*MockK8sRepoMockRecorder) GetNamespace

func (mr *MockK8sRepoMockRecorder) GetNamespace(arg0, arg1 any) *gomock.Call

GetNamespace indicates an expected call of GetNamespace.

func (*MockK8sRepoMockRecorder) GetPod

func (mr *MockK8sRepoMockRecorder) GetPod(arg0, arg1 any) *gomock.Call

GetPod indicates an expected call of GetPod.

func (*MockK8sRepoMockRecorder) GetPodLogs

func (mr *MockK8sRepoMockRecorder) GetPodLogs(arg0, arg1, arg2, arg3 any) *gomock.Call

GetPodLogs indicates an expected call of GetPodLogs.

func (*MockK8sRepoMockRecorder) GetPodMetrics

func (mr *MockK8sRepoMockRecorder) GetPodMetrics(arg0, arg1, arg2 any) *gomock.Call

GetPodMetrics indicates an expected call of GetPodMetrics.

func (*MockK8sRepoMockRecorder) GetPodSelectorsByManifest

func (mr *MockK8sRepoMockRecorder) GetPodSelectorsByManifest(arg0 any) *gomock.Call

GetPodSelectorsByManifest indicates an expected call of GetPodSelectorsByManifest.

func (*MockK8sRepoMockRecorder) IsPodRunning

func (mr *MockK8sRepoMockRecorder) IsPodRunning(arg0, arg1 any) *gomock.Call

IsPodRunning indicates an expected call of IsPodRunning.

func (*MockK8sRepoMockRecorder) ListEvents

func (mr *MockK8sRepoMockRecorder) ListEvents(arg0 any) *gomock.Call

ListEvents indicates an expected call of ListEvents.

func (*MockK8sRepoMockRecorder) LogStream

func (mr *MockK8sRepoMockRecorder) LogStream(arg0, arg1, arg2, arg3 any) *gomock.Call

LogStream indicates an expected call of LogStream.

func (*MockK8sRepoMockRecorder) SplitManifests

func (mr *MockK8sRepoMockRecorder) SplitManifests(arg0 any) *gomock.Call

SplitManifests indicates an expected call of SplitManifests.

type MockNamespaceRepo

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

MockNamespaceRepo is a mock of NamespaceRepo interface.

func NewMockNamespaceRepo

func NewMockNamespaceRepo(ctrl *gomock.Controller) *MockNamespaceRepo

NewMockNamespaceRepo creates a new mock instance.

func (*MockNamespaceRepo) CanAccess

func (m *MockNamespaceRepo) CanAccess(arg0 context.Context, arg1 int, arg2 *schematype.UserInfo) bool

CanAccess mocks base method.

func (*MockNamespaceRepo) Create

Create mocks base method.

func (*MockNamespaceRepo) Delete

func (m *MockNamespaceRepo) Delete(arg0 context.Context, arg1 int) error

Delete mocks base method.

func (*MockNamespaceRepo) EXPECT

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

func (*MockNamespaceRepo) Favorite

Favorite mocks base method.

func (*MockNamespaceRepo) FindByName

func (m *MockNamespaceRepo) FindByName(arg0 context.Context, arg1 string) (*Namespace, error)

FindByName mocks base method.

func (*MockNamespaceRepo) GetMarsNamespace

func (m *MockNamespaceRepo) GetMarsNamespace(arg0 string) string

GetMarsNamespace mocks base method.

func (*MockNamespaceRepo) IsOwner

func (m *MockNamespaceRepo) IsOwner(arg0 context.Context, arg1 int, arg2 *schematype.UserInfo) (bool, error)

IsOwner mocks base method.

func (*MockNamespaceRepo) List

List mocks base method.

func (*MockNamespaceRepo) Show

func (m *MockNamespaceRepo) Show(arg0 context.Context, arg1 int) (*Namespace, error)

Show mocks base method.

func (*MockNamespaceRepo) SyncMembers

func (m *MockNamespaceRepo) SyncMembers(arg0 context.Context, arg1 int, arg2 []string) (*Namespace, error)

SyncMembers mocks base method.

func (*MockNamespaceRepo) Transfer

func (m *MockNamespaceRepo) Transfer(arg0 context.Context, arg1 int, arg2 string) (*Namespace, error)

Transfer mocks base method.

func (*MockNamespaceRepo) Update

Update mocks base method.

func (*MockNamespaceRepo) UpdatePrivate

func (m *MockNamespaceRepo) UpdatePrivate(arg0 context.Context, arg1 int, arg2 bool) (*Namespace, error)

UpdatePrivate mocks base method.

type MockNamespaceRepoMockRecorder

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

MockNamespaceRepoMockRecorder is the mock recorder for MockNamespaceRepo.

func (*MockNamespaceRepoMockRecorder) CanAccess

func (mr *MockNamespaceRepoMockRecorder) CanAccess(arg0, arg1, arg2 any) *gomock.Call

CanAccess indicates an expected call of CanAccess.

func (*MockNamespaceRepoMockRecorder) Create

func (mr *MockNamespaceRepoMockRecorder) Create(arg0, arg1 any) *gomock.Call

Create indicates an expected call of Create.

func (*MockNamespaceRepoMockRecorder) Delete

func (mr *MockNamespaceRepoMockRecorder) Delete(arg0, arg1 any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockNamespaceRepoMockRecorder) Favorite

func (mr *MockNamespaceRepoMockRecorder) Favorite(arg0, arg1 any) *gomock.Call

Favorite indicates an expected call of Favorite.

func (*MockNamespaceRepoMockRecorder) FindByName

func (mr *MockNamespaceRepoMockRecorder) FindByName(arg0, arg1 any) *gomock.Call

FindByName indicates an expected call of FindByName.

func (*MockNamespaceRepoMockRecorder) GetMarsNamespace

func (mr *MockNamespaceRepoMockRecorder) GetMarsNamespace(arg0 any) *gomock.Call

GetMarsNamespace indicates an expected call of GetMarsNamespace.

func (*MockNamespaceRepoMockRecorder) IsOwner

func (mr *MockNamespaceRepoMockRecorder) IsOwner(arg0, arg1, arg2 any) *gomock.Call

IsOwner indicates an expected call of IsOwner.

func (*MockNamespaceRepoMockRecorder) List

func (mr *MockNamespaceRepoMockRecorder) List(arg0, arg1 any) *gomock.Call

List indicates an expected call of List.

func (*MockNamespaceRepoMockRecorder) Show

func (mr *MockNamespaceRepoMockRecorder) Show(arg0, arg1 any) *gomock.Call

Show indicates an expected call of Show.

func (*MockNamespaceRepoMockRecorder) SyncMembers

func (mr *MockNamespaceRepoMockRecorder) SyncMembers(arg0, arg1, arg2 any) *gomock.Call

SyncMembers indicates an expected call of SyncMembers.

func (*MockNamespaceRepoMockRecorder) Transfer

func (mr *MockNamespaceRepoMockRecorder) Transfer(arg0, arg1, arg2 any) *gomock.Call

Transfer indicates an expected call of Transfer.

func (*MockNamespaceRepoMockRecorder) Update

func (mr *MockNamespaceRepoMockRecorder) Update(arg0, arg1 any) *gomock.Call

Update indicates an expected call of Update.

func (*MockNamespaceRepoMockRecorder) UpdatePrivate

func (mr *MockNamespaceRepoMockRecorder) UpdatePrivate(arg0, arg1, arg2 any) *gomock.Call

UpdatePrivate indicates an expected call of UpdatePrivate.

type MockPictureRepo

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

MockPictureRepo is a mock of PictureRepo interface.

func NewMockPictureRepo

func NewMockPictureRepo(ctrl *gomock.Controller) *MockPictureRepo

NewMockPictureRepo creates a new mock instance.

func (*MockPictureRepo) EXPECT

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

func (*MockPictureRepo) Get

Get mocks base method.

type MockPictureRepoMockRecorder

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

MockPictureRepoMockRecorder is the mock recorder for MockPictureRepo.

func (*MockPictureRepoMockRecorder) Get

func (mr *MockPictureRepoMockRecorder) Get(arg0, arg1 any) *gomock.Call

Get indicates an expected call of Get.

type MockProjectRepo

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

MockProjectRepo is a mock of ProjectRepo interface.

func NewMockProjectRepo

func NewMockProjectRepo(ctrl *gomock.Controller) *MockProjectRepo

NewMockProjectRepo creates a new mock instance.

func (*MockProjectRepo) Create

func (m *MockProjectRepo) Create(arg0 context.Context, arg1 *CreateProjectInput) (*Project, error)

Create mocks base method.

func (*MockProjectRepo) Delete

func (m *MockProjectRepo) Delete(arg0 context.Context, arg1 int) error

Delete mocks base method.

func (*MockProjectRepo) EXPECT

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

func (*MockProjectRepo) FindByName

func (m *MockProjectRepo) FindByName(arg0 context.Context, arg1 string, arg2 int) (*Project, error)

FindByName mocks base method.

func (*MockProjectRepo) FindByVersion

func (m *MockProjectRepo) FindByVersion(arg0 context.Context, arg1, arg2 int) (*Project, error)

FindByVersion mocks base method.

func (*MockProjectRepo) GetAllActiveContainers

func (m *MockProjectRepo) GetAllActiveContainers(arg0 context.Context, arg1 int) ([]*types.StateContainer, error)

GetAllActiveContainers mocks base method.

func (*MockProjectRepo) GetPreOccupiedLenByValuesYaml

func (m *MockProjectRepo) GetPreOccupiedLenByValuesYaml(arg0 string) int

GetPreOccupiedLenByValuesYaml mocks base method.

func (*MockProjectRepo) GetProjectEndpointsInNamespace

func (m *MockProjectRepo) GetProjectEndpointsInNamespace(arg0 context.Context, arg1 string, arg2 ...int) ([]*types.ServiceEndpoint, error)

GetProjectEndpointsInNamespace mocks base method.

func (*MockProjectRepo) List

List mocks base method.

func (*MockProjectRepo) Show

func (m *MockProjectRepo) Show(arg0 context.Context, arg1 int) (*Project, error)

Show mocks base method.

func (*MockProjectRepo) UpdateDeployStatus

func (m *MockProjectRepo) UpdateDeployStatus(arg0 context.Context, arg1 int, arg2 types.Deploy) (*Project, error)

UpdateDeployStatus mocks base method.

func (*MockProjectRepo) UpdateProject

func (m *MockProjectRepo) UpdateProject(arg0 context.Context, arg1 *UpdateProjectInput) (*Project, error)

UpdateProject mocks base method.

func (*MockProjectRepo) UpdateStatusByVersion

func (m *MockProjectRepo) UpdateStatusByVersion(arg0 context.Context, arg1 int, arg2 types.Deploy, arg3 int) (*Project, error)

UpdateStatusByVersion mocks base method.

func (*MockProjectRepo) UpdateVersion

func (m *MockProjectRepo) UpdateVersion(arg0 context.Context, arg1, arg2 int) (*Project, error)

UpdateVersion mocks base method.

type MockProjectRepoMockRecorder

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

MockProjectRepoMockRecorder is the mock recorder for MockProjectRepo.

func (*MockProjectRepoMockRecorder) Create

func (mr *MockProjectRepoMockRecorder) Create(arg0, arg1 any) *gomock.Call

Create indicates an expected call of Create.

func (*MockProjectRepoMockRecorder) Delete

func (mr *MockProjectRepoMockRecorder) Delete(arg0, arg1 any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockProjectRepoMockRecorder) FindByName

func (mr *MockProjectRepoMockRecorder) FindByName(arg0, arg1, arg2 any) *gomock.Call

FindByName indicates an expected call of FindByName.

func (*MockProjectRepoMockRecorder) FindByVersion

func (mr *MockProjectRepoMockRecorder) FindByVersion(arg0, arg1, arg2 any) *gomock.Call

FindByVersion indicates an expected call of FindByVersion.

func (*MockProjectRepoMockRecorder) GetAllActiveContainers

func (mr *MockProjectRepoMockRecorder) GetAllActiveContainers(arg0, arg1 any) *gomock.Call

GetAllActiveContainers indicates an expected call of GetAllActiveContainers.

func (*MockProjectRepoMockRecorder) GetPreOccupiedLenByValuesYaml

func (mr *MockProjectRepoMockRecorder) GetPreOccupiedLenByValuesYaml(arg0 any) *gomock.Call

GetPreOccupiedLenByValuesYaml indicates an expected call of GetPreOccupiedLenByValuesYaml.

func (*MockProjectRepoMockRecorder) GetProjectEndpointsInNamespace

func (mr *MockProjectRepoMockRecorder) GetProjectEndpointsInNamespace(arg0, arg1 any, arg2 ...any) *gomock.Call

GetProjectEndpointsInNamespace indicates an expected call of GetProjectEndpointsInNamespace.

func (*MockProjectRepoMockRecorder) List

func (mr *MockProjectRepoMockRecorder) List(arg0, arg1 any) *gomock.Call

List indicates an expected call of List.

func (*MockProjectRepoMockRecorder) Show

func (mr *MockProjectRepoMockRecorder) Show(arg0, arg1 any) *gomock.Call

Show indicates an expected call of Show.

func (*MockProjectRepoMockRecorder) UpdateDeployStatus

func (mr *MockProjectRepoMockRecorder) UpdateDeployStatus(arg0, arg1, arg2 any) *gomock.Call

UpdateDeployStatus indicates an expected call of UpdateDeployStatus.

func (*MockProjectRepoMockRecorder) UpdateProject

func (mr *MockProjectRepoMockRecorder) UpdateProject(arg0, arg1 any) *gomock.Call

UpdateProject indicates an expected call of UpdateProject.

func (*MockProjectRepoMockRecorder) UpdateStatusByVersion

func (mr *MockProjectRepoMockRecorder) UpdateStatusByVersion(arg0, arg1, arg2, arg3 any) *gomock.Call

UpdateStatusByVersion indicates an expected call of UpdateStatusByVersion.

func (*MockProjectRepoMockRecorder) UpdateVersion

func (mr *MockProjectRepoMockRecorder) UpdateVersion(arg0, arg1, arg2 any) *gomock.Call

UpdateVersion indicates an expected call of UpdateVersion.

type MockRecorder

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

MockRecorder is a mock of Recorder interface.

func NewMockRecorder

func NewMockRecorder(ctrl *gomock.Controller) *MockRecorder

NewMockRecorder creates a new mock instance.

func (*MockRecorder) Close

func (m *MockRecorder) Close() error

Close mocks base method.

func (*MockRecorder) Container

func (m *MockRecorder) Container() *Container

Container mocks base method.

func (*MockRecorder) Duration

func (m *MockRecorder) Duration() time.Duration

Duration mocks base method.

func (*MockRecorder) EXPECT

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

func (*MockRecorder) File

func (m *MockRecorder) File() *File

File mocks base method.

func (*MockRecorder) GetShell

func (m *MockRecorder) GetShell() string

GetShell mocks base method.

func (*MockRecorder) Resize

func (m *MockRecorder) Resize(arg0, arg1 uint16)

Resize mocks base method.

func (*MockRecorder) SetShell

func (m *MockRecorder) SetShell(arg0 string)

SetShell mocks base method.

func (*MockRecorder) User

func (m *MockRecorder) User() *schematype.UserInfo

User mocks base method.

func (*MockRecorder) Write

func (m *MockRecorder) Write(arg0 []byte) (int, error)

Write mocks base method.

type MockRecorderMockRecorder

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

MockRecorderMockRecorder is the mock recorder for MockRecorder.

func (*MockRecorderMockRecorder) Close

func (mr *MockRecorderMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockRecorderMockRecorder) Container

func (mr *MockRecorderMockRecorder) Container() *gomock.Call

Container indicates an expected call of Container.

func (*MockRecorderMockRecorder) Duration

func (mr *MockRecorderMockRecorder) Duration() *gomock.Call

Duration indicates an expected call of Duration.

func (*MockRecorderMockRecorder) File

func (mr *MockRecorderMockRecorder) File() *gomock.Call

File indicates an expected call of File.

func (*MockRecorderMockRecorder) GetShell

func (mr *MockRecorderMockRecorder) GetShell() *gomock.Call

GetShell indicates an expected call of GetShell.

func (*MockRecorderMockRecorder) Resize

func (mr *MockRecorderMockRecorder) Resize(arg0, arg1 any) *gomock.Call

Resize indicates an expected call of Resize.

func (*MockRecorderMockRecorder) SetShell

func (mr *MockRecorderMockRecorder) SetShell(arg0 any) *gomock.Call

SetShell indicates an expected call of SetShell.

func (*MockRecorderMockRecorder) User

func (mr *MockRecorderMockRecorder) User() *gomock.Call

User indicates an expected call of User.

func (*MockRecorderMockRecorder) Write

func (mr *MockRecorderMockRecorder) Write(arg0 any) *gomock.Call

Write indicates an expected call of Write.

type MockRepoRepo

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

MockRepoRepo is a mock of RepoRepo interface.

func NewMockRepoRepo

func NewMockRepoRepo(ctrl *gomock.Controller) *MockRepoRepo

NewMockRepoRepo creates a new mock instance.

func (*MockRepoRepo) All

func (m *MockRepoRepo) All(arg0 context.Context, arg1 *AllRepoRequest) ([]*Repo, error)

All mocks base method.

func (*MockRepoRepo) Clone

func (m *MockRepoRepo) Clone(arg0 context.Context, arg1 *CloneRepoInput) (*Repo, error)

Clone mocks base method.

func (*MockRepoRepo) Create

func (m *MockRepoRepo) Create(arg0 context.Context, arg1 *CreateRepoInput) (*Repo, error)

Create mocks base method.

func (*MockRepoRepo) Delete

func (m *MockRepoRepo) Delete(arg0 context.Context, arg1 int) error

Delete mocks base method.

func (*MockRepoRepo) EXPECT

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

func (*MockRepoRepo) List

List mocks base method.

func (*MockRepoRepo) Show

func (m *MockRepoRepo) Show(arg0 context.Context, arg1 int) (*Repo, error)

Show mocks base method.

func (*MockRepoRepo) ToggleEnabled

func (m *MockRepoRepo) ToggleEnabled(arg0 context.Context, arg1 int, arg2 bool) (*Repo, error)

ToggleEnabled mocks base method.

func (*MockRepoRepo) Update

func (m *MockRepoRepo) Update(arg0 context.Context, arg1 *UpdateRepoInput) (*Repo, error)

Update mocks base method.

type MockRepoRepoMockRecorder

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

MockRepoRepoMockRecorder is the mock recorder for MockRepoRepo.

func (*MockRepoRepoMockRecorder) All

func (mr *MockRepoRepoMockRecorder) All(arg0, arg1 any) *gomock.Call

All indicates an expected call of All.

func (*MockRepoRepoMockRecorder) Clone

func (mr *MockRepoRepoMockRecorder) Clone(arg0, arg1 any) *gomock.Call

Clone indicates an expected call of Clone.

func (*MockRepoRepoMockRecorder) Create

func (mr *MockRepoRepoMockRecorder) Create(arg0, arg1 any) *gomock.Call

Create indicates an expected call of Create.

func (*MockRepoRepoMockRecorder) Delete

func (mr *MockRepoRepoMockRecorder) Delete(arg0, arg1 any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockRepoRepoMockRecorder) List

func (mr *MockRepoRepoMockRecorder) List(arg0, arg1 any) *gomock.Call

List indicates an expected call of List.

func (*MockRepoRepoMockRecorder) Show

func (mr *MockRepoRepoMockRecorder) Show(arg0, arg1 any) *gomock.Call

Show indicates an expected call of Show.

func (*MockRepoRepoMockRecorder) ToggleEnabled

func (mr *MockRepoRepoMockRecorder) ToggleEnabled(arg0, arg1, arg2 any) *gomock.Call

ToggleEnabled indicates an expected call of ToggleEnabled.

func (*MockRepoRepoMockRecorder) Update

func (mr *MockRepoRepoMockRecorder) Update(arg0, arg1 any) *gomock.Call

Update indicates an expected call of Update.

type Namespace

type Namespace struct {
	ID               int
	CreatedAt        time.Time
	UpdatedAt        time.Time
	DeletedAt        *time.Time
	Name             string
	ImagePullSecrets []string
	Description      string
	Private          bool
	CreatorEmail     string

	Projects  []*Project
	Favorites []*Favorite
	Members   []*Member
}

Namespace is the model entity for the Namespace schema.

func ToNamespace

func ToNamespace(namespace *ent.Namespace) *Namespace

func (*Namespace) GetImagePullSecrets

func (ns *Namespace) GetImagePullSecrets() []*types.ImagePullSecret

type NamespaceCreatedData

type NamespaceCreatedData struct {
	NsModel  *Namespace
	NsK8sObj *corev1.Namespace
}

type NamespaceDeletedData

type NamespaceDeletedData struct {
	ID int
}

type NamespaceRepo

type NamespaceRepo interface {
	List(ctx context.Context, input *ListNamespaceInput) ([]*Namespace, *pagination.Pagination, error)
	Create(ctx context.Context, input *CreateNamespaceInput) (*Namespace, error)
	Show(ctx context.Context, id int) (*Namespace, error)
	Update(ctx context.Context, input *UpdateNamespaceInput) (*Namespace, error)
	Delete(ctx context.Context, id int) error
	GetMarsNamespace(name string) string
	FindByName(ctx context.Context, name string) (*Namespace, error)
	Favorite(ctx context.Context, input *FavoriteNamespaceInput) error
	SyncMembers(ctx context.Context, namespaceID int, memberEmails []string) (*Namespace, error)
	UpdatePrivate(ctx context.Context, namespaceID int, private bool) (*Namespace, error)
	IsOwner(ctx context.Context, namespaceID int, user *auth.UserInfo) (bool, error)
	CanAccess(ctx context.Context, namespaceID int, user *auth.UserInfo) bool
	Transfer(ctx context.Context, id int, email string) (*Namespace, error)
}

func NewNamespaceRepo

func NewNamespaceRepo(logger mlog.Logger, data data.Data) NamespaceRepo

type PictureRepo

type PictureRepo interface {
	Get(ctx context.Context, random bool) (*application.PictureItem, error)
}

func NewPictureRepo

func NewPictureRepo(logger mlog.Logger, pl application.PluginManger) PictureRepo

type Pipeline

type Pipeline struct {
	Status application.Status
	WebURL string
}

type Project

type Project struct {
	ID               int
	CreatedAt        time.Time
	UpdatedAt        time.Time
	DeletedAt        *time.Time
	Name             string
	GitProjectID     int
	GitBranch        string
	GitCommit        string
	Config           string
	OverrideValues   string
	DockerImage      []string
	PodSelectors     []string
	Atomic           bool
	DeployStatus     types.Deploy
	EnvValues        []*types.KeyValue
	ExtraValues      []*websocket_pb.ExtraValue
	FinalExtraValues []*websocket_pb.ExtraValue
	Version          int
	ConfigType       string
	GitCommitWebURL  string
	GitCommitTitle   string
	GitCommitAuthor  string
	GitCommitDate    *time.Time
	NamespaceID      int
	RepoID           int

	// 用户前端表单 elements
	// 和 extraValues 的区别是
	// extraValues 是系统默认的额外值
	// elements 是 repoImpl 最新的
	Elements []*types.KeyValue

	Namespace *Namespace
	Repo      *Repo
	Manifest  []string
}

func ToProject

func ToProject(project *ent.Project) *Project

type ProjectChangedData

type ProjectChangedData struct {
	ID int

	Username string
}

type ProjectDeletedPayload

type ProjectDeletedPayload struct {
	NamespaceID int
	ProjectID   int
}

type ProjectRepo

type ProjectRepo interface {
	GetAllActiveContainers(ctx context.Context, id int) ([]*types.StateContainer, error)
	GetProjectEndpointsInNamespace(ctx context.Context, namespace string, projectIDs ...int) ([]*types.ServiceEndpoint, error)
	GetPreOccupiedLenByValuesYaml(values string) int
	List(ctx context.Context, input *ListProjectInput) ([]*Project, *pagination.Pagination, error)
	Create(ctx context.Context, project *CreateProjectInput) (*Project, error)
	Show(ctx context.Context, id int) (*Project, error)
	Delete(ctx context.Context, id int) error
	FindByName(ctx context.Context, name string, nsID int) (*Project, error)
	UpdateDeployStatus(ctx context.Context, id int, status types.Deploy) (*Project, error)
	UpdateVersion(ctx context.Context, id int, version int) (*Project, error)
	FindByVersion(ctx context.Context, id, version int) (*Project, error)
	UpdateStatusByVersion(ctx context.Context, id int, status types.Deploy, version int) (*Project, error)
	UpdateProject(ctx context.Context, input *UpdateProjectInput) (*Project, error)
}

func NewProjectRepo

func NewProjectRepo(logger mlog.Logger, data data.Data) ProjectRepo

type Recorder

type Recorder interface {
	Resize(cols, rows uint16)
	Write(p []byte) (n int, err error)
	Close() error
	SetShell(string)
	GetShell() string
	File() *File
	Duration() time.Duration
	User() *auth.UserInfo
	Container() *Container
}

type ReleaseList

type ReleaseList map[string]ListReleaseItem

func (ReleaseList) Add

func (l ReleaseList) Add(r *release.Release)

func (ReleaseList) GetStatus

func (l ReleaseList) GetStatus(namespace, name string) string

type Repo

type Repo struct {
	ID             int          `json:"id"`
	CreatedAt      time.Time    `json:"-"`
	UpdatedAt      time.Time    `json:"-"`
	DeletedAt      *time.Time   `json:"-"`
	Name           string       `json:"name"`
	DefaultBranch  string       `json:"default_branch"`
	GitProjectName string       `json:"git_project_name"`
	GitProjectID   int32        `json:"git_project_id"`
	Enabled        bool         `json:"enabled"`
	NeedGitRepo    bool         `json:"need_git_repo"`
	MarsConfig     *mars.Config `json:"mars_config"`
	Description    string       `json:"description"`

	Projects []*Project `json:"projects"`
}

func ToRepo

func ToRepo(data *ent.Repo) *Repo

func (*Repo) GetMarsConfig

func (r *Repo) GetMarsConfig() (cfg *mars.Config)

type RepoRepo

type RepoRepo interface {
	All(ctx context.Context, in *AllRepoRequest) ([]*Repo, error)
	List(ctx context.Context, in *ListRepoRequest) ([]*Repo, *pagination.Pagination, error)
	Create(ctx context.Context, in *CreateRepoInput) (*Repo, error)
	Show(ctx context.Context, id int) (*Repo, error)
	Update(ctx context.Context, in *UpdateRepoInput) (*Repo, error)
	Delete(ctx context.Context, id int) error
	Clone(ctx context.Context, input *CloneRepoInput) (*Repo, error)
	ToggleEnabled(ctx context.Context, id int, enabled bool) (*Repo, error)
}

func NewRepo

func NewRepo(logger mlog.Logger, data data.Data, gitRepo GitRepo) RepoRepo

type RuntimeObjectList

type RuntimeObjectList []runtime.Object

func FilterRuntimeObjectFromManifests

func FilterRuntimeObjectFromManifests[T runtime.Object](logger mlog.Logger, manifests []string) RuntimeObjectList

func (RuntimeObjectList) Has

type SortStatePod

type SortStatePod []StatePod

func (SortStatePod) Len

func (s SortStatePod) Len() int

func (SortStatePod) Less

func (s SortStatePod) Less(i, j int) bool

func (SortStatePod) Swap

func (s SortStatePod) Swap(i, j int)

type StatePod

type StatePod struct {
	IsOld       bool
	Terminating bool
	Pending     bool
	OrderIndex  int
	Pod         *corev1.Pod
}

type StreamUploadFileRequest

type StreamUploadFileRequest struct {
	Namespace, Pod, Container string
	Username                  string
	FileName                  string
	FileData                  chan []byte
}

type StringYamlPrettier

type StringYamlPrettier struct {
	Str string
}

func (*StringYamlPrettier) PrettyYaml

func (s *StringYamlPrettier) PrettyYaml() string

type UpdateFileRequest

type UpdateFileRequest struct {
	ID            int
	ContainerPath string
	Namespace     string
	Pod           string
	Container     string
}

type UpdateNamespaceInput

type UpdateNamespaceInput struct {
	ID          int
	Description string
}

type UpdateProjectInput

type UpdateProjectInput struct {
	ID         int
	GitBranch  string
	GitCommit  string
	Config     string
	Atomic     *bool
	ConfigType string

	PodSelectors     []string
	DockerImage      []string
	GitCommitTitle   string
	GitCommitWebURL  string
	GitCommitAuthor  string
	GitCommitDate    *time.Time
	ExtraValues      []*websocket_pb.ExtraValue
	FinalExtraValues []*websocket_pb.ExtraValue
	EnvValues        []*types.KeyValue
	OverrideValues   string
	Manifest         []string
}

type UpdateRepoInput

type UpdateRepoInput struct {
	ID           int32
	Name         string
	NeedGitRepo  bool
	GitProjectID *int32
	MarsConfig   *mars.Config
	Description  string
}

type WrapLogFn

type WrapLogFn func(container []*websocket_pb.Container, format string, v ...any)

func (WrapLogFn) UnWrap

func (l WrapLogFn) UnWrap() func(format string, v ...any)

type YamlPrettier

type YamlPrettier interface {
	PrettyYaml() string
}

Jump to

Keyboard shortcuts

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