svc_interface

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package svc_interface is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigSystem

type ConfigSystem interface {
	// ConfigEdit 配置变更回调,有历史记录
	// 做一个配置覆盖编辑,如果是回滚,则用发布前版本覆盖
	// 如果是全量发布,则用发布内容覆盖
	ConfigEdit()

	// GetConfig 根据 configID 获取 config
	GetConfig(ctx context.Context, configID int) (*model.Config, error)

	// ConfigKey 获取配置 key 格式
	ConfigKey(isPublic bool, projectGroupID int, projectKey string, namespaceName string, configName string, configType model.ConfigType) string

	// GetConfigProjectAndNamespace 获取 project 和 namespace 的关键信息
	GetConfigProjectAndNamespace(ctx context.Context, projectID int, namespaceID int) (*model.Project, *model.Namespace, error)
}

ConfigSystem 配置系统

type MockConfigSystem

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

MockConfigSystem is a mock of ConfigSystem interface.

func NewMockConfigSystem

func NewMockConfigSystem(ctrl *gomock.Controller) *MockConfigSystem

NewMockConfigSystem creates a new mock instance.

func (*MockConfigSystem) ConfigEdit

func (m *MockConfigSystem) ConfigEdit()

ConfigEdit mocks base method.

func (*MockConfigSystem) ConfigKey

func (m *MockConfigSystem) ConfigKey(isPublic bool, projectGroupID int, projectKey, namespaceName, configName string, configType model.ConfigType) string

ConfigKey mocks base method.

func (*MockConfigSystem) EXPECT

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

func (*MockConfigSystem) GetConfig

func (m *MockConfigSystem) GetConfig(ctx context.Context, configID int) (*model.Config, error)

GetConfig mocks base method.

func (*MockConfigSystem) GetConfigProjectAndNamespace

func (m *MockConfigSystem) GetConfigProjectAndNamespace(ctx context.Context, projectID, namespaceID int) (*model.Project, *model.Namespace, error)

GetConfigProjectAndNamespace mocks base method.

type MockConfigSystemMockRecorder

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

MockConfigSystemMockRecorder is the mock recorder for MockConfigSystem.

func (*MockConfigSystemMockRecorder) ConfigEdit

func (mr *MockConfigSystemMockRecorder) ConfigEdit() *gomock.Call

ConfigEdit indicates an expected call of ConfigEdit.

func (*MockConfigSystemMockRecorder) ConfigKey

func (mr *MockConfigSystemMockRecorder) ConfigKey(isPublic, projectGroupID, projectKey, namespaceName, configName, configType interface{}) *gomock.Call

ConfigKey indicates an expected call of ConfigKey.

func (*MockConfigSystemMockRecorder) GetConfig

func (mr *MockConfigSystemMockRecorder) GetConfig(ctx, configID interface{}) *gomock.Call

GetConfig indicates an expected call of GetConfig.

func (*MockConfigSystemMockRecorder) GetConfigProjectAndNamespace

func (mr *MockConfigSystemMockRecorder) GetConfigProjectAndNamespace(ctx, projectID, namespaceID interface{}) *gomock.Call

GetConfigProjectAndNamespace indicates an expected call of GetConfigProjectAndNamespace.

type MockPublishSystem

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

MockPublishSystem is a mock of PublishSystem interface.

func NewMockPublishSystem

func NewMockPublishSystem(ctrl *gomock.Controller) *MockPublishSystem

NewMockPublishSystem creates a new mock instance.

func (*MockPublishSystem) DecryptPublishContent

func (m *MockPublishSystem) DecryptPublishContent(ctx context.Context, pContent string) string

DecryptPublishContent mocks base method.

func (*MockPublishSystem) DeletePublish

func (m *MockPublishSystem) DeletePublish(ctx context.Context, projectID, namespaceID, newStatus int) error

DeletePublish mocks base method.

func (*MockPublishSystem) EXPECT

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

func (*MockPublishSystem) EnterPublish

func (m *MockPublishSystem) EnterPublish(ctx context.Context, projectID, namespaceID, configID int, content string) error

EnterPublish mocks base method.

func (*MockPublishSystem) IsInPublish

func (m *MockPublishSystem) IsInPublish(ctx context.Context, projectKey, namespaceName string) (bool, error)

IsInPublish mocks base method.

func (*MockPublishSystem) ListPublishConfig

func (m *MockPublishSystem) ListPublishConfig(ctx context.Context, projectID, namespaceID int) ([]model.PublishConfig, string, error)

ListPublishConfig mocks base method.

type MockPublishSystemMockRecorder

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

MockPublishSystemMockRecorder is the mock recorder for MockPublishSystem.

func (*MockPublishSystemMockRecorder) DecryptPublishContent

func (mr *MockPublishSystemMockRecorder) DecryptPublishContent(ctx, pContent interface{}) *gomock.Call

DecryptPublishContent indicates an expected call of DecryptPublishContent.

func (*MockPublishSystemMockRecorder) DeletePublish

func (mr *MockPublishSystemMockRecorder) DeletePublish(ctx, projectID, namespaceID, newStatus interface{}) *gomock.Call

DeletePublish indicates an expected call of DeletePublish.

func (*MockPublishSystemMockRecorder) EnterPublish

func (mr *MockPublishSystemMockRecorder) EnterPublish(ctx, projectID, namespaceID, configID, content interface{}) *gomock.Call

EnterPublish indicates an expected call of EnterPublish.

func (*MockPublishSystemMockRecorder) IsInPublish

func (mr *MockPublishSystemMockRecorder) IsInPublish(ctx, projectKey, namespaceName interface{}) *gomock.Call

IsInPublish indicates an expected call of IsInPublish.

func (*MockPublishSystemMockRecorder) ListPublishConfig

func (mr *MockPublishSystemMockRecorder) ListPublishConfig(ctx, projectID, namespaceID interface{}) *gomock.Call

ListPublishConfig indicates an expected call of ListPublishConfig.

type PublishSystem

type PublishSystem interface {
	// EnterPublish
	// ConfigSystem 判断本次更新配置是否需要进入发布系统(判断条件:编辑的命名空间是否需要发布),进入发布系统则不走原来的配置编辑逻辑。
	EnterPublish(ctx context.Context, projectID, namespaceID, configID int, content string) error

	IsInPublish(ctx context.Context, projectKey, namespaceName string) (bool, error)

	DecryptPublishContent(ctx context.Context, pContent string) string

	ListPublishConfig(ctx context.Context, projectID, namespaceID int) ([]model.PublishConfig, string, error)

	DeletePublish(ctx context.Context, projectID, namespaceID int, newStatus int) error
}

PublishSystem 发布系统

Jump to

Keyboard shortcuts

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