mars

package
v0.0.0-...-51115e0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Overview

Package mars is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ElementType_name = map[int32]string{
		0: "ElementTypeUnknown",
		1: "ElementTypeInput",
		2: "ElementTypeInputNumber",
		3: "ElementTypeSelect",
		4: "ElementTypeRadio",
		5: "ElementTypeSwitch",
	}
	ElementType_value = map[string]int32{
		"ElementTypeUnknown":     0,
		"ElementTypeInput":       1,
		"ElementTypeInputNumber": 2,
		"ElementTypeSelect":      3,
		"ElementTypeRadio":       4,
		"ElementTypeSwitch":      5,
	}
)

Enum value maps for ElementType.

View Source
var File_mars_mars_proto protoreflect.FileDescriptor
View Source
var Mars_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Mars",
	HandlerType: (*MarsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Show",
			Handler:    _Mars_Show_Handler,
		},
		{
			MethodName: "GlobalConfig",
			Handler:    _Mars_GlobalConfig_Handler,
		},
		{
			MethodName: "ToggleEnabled",
			Handler:    _Mars_ToggleEnabled_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Mars_Update_Handler,
		},
		{
			MethodName: "GetDefaultChartValues",
			Handler:    _Mars_GetDefaultChartValues_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "mars/mars.proto",
}

Mars_ServiceDesc is the grpc.ServiceDesc for Mars service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMarsHandler

func RegisterMarsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMarsHandler registers the http handlers for service Mars to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMarsHandlerClient

func RegisterMarsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MarsClient) error

RegisterMarsHandlerClient registers the http handlers for service Mars to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MarsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MarsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MarsClient" to call the correct interceptors.

func RegisterMarsHandlerFromEndpoint

func RegisterMarsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMarsHandlerFromEndpoint is same as RegisterMarsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMarsHandlerServer

func RegisterMarsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MarsServer) error

RegisterMarsHandlerServer registers the http handlers for service Mars to "mux". UnaryRPC :call MarsServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMarsHandlerFromEndpoint instead.

func RegisterMarsServer

func RegisterMarsServer(s grpc.ServiceRegistrar, srv MarsServer)

Types

type Element

type Element struct {
	Path         string      `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Type         ElementType `protobuf:"varint,2,opt,name=type,proto3,enum=ElementType" json:"type,omitempty"`
	Default      string      `protobuf:"bytes,3,opt,name=default,proto3" json:"default,omitempty"`
	Description  string      `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	SelectValues []string    `protobuf:"bytes,6,rep,name=select_values,json=selectValues,proto3" json:"select_values,omitempty"`
	// contains filtered or unexported fields
}

func (*Element) Descriptor deprecated

func (*Element) Descriptor() ([]byte, []int)

Deprecated: Use Element.ProtoReflect.Descriptor instead.

func (*Element) GetDefault

func (x *Element) GetDefault() string

func (*Element) GetDescription

func (x *Element) GetDescription() string

func (*Element) GetPath

func (x *Element) GetPath() string

func (*Element) GetSelectValues

func (x *Element) GetSelectValues() []string

func (*Element) GetType

func (x *Element) GetType() ElementType

func (*Element) ProtoMessage

func (*Element) ProtoMessage()

func (*Element) ProtoReflect

func (x *Element) ProtoReflect() protoreflect.Message

func (*Element) Reset

func (x *Element) Reset()

func (*Element) String

func (x *Element) String() string

func (*Element) Validate

func (m *Element) Validate() error

Validate checks the field values on Element with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Element) ValidateAll

func (m *Element) ValidateAll() error

ValidateAll checks the field values on Element with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ElementMultiError, or nil if none found.

type ElementMultiError

type ElementMultiError []error

ElementMultiError is an error wrapping multiple validation errors returned by Element.ValidateAll() if the designated constraints aren't met.

func (ElementMultiError) AllErrors

func (m ElementMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ElementMultiError) Error

func (m ElementMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ElementType

type ElementType int32
const (
	ElementType_ElementTypeUnknown     ElementType = 0
	ElementType_ElementTypeInput       ElementType = 1
	ElementType_ElementTypeInputNumber ElementType = 2
	ElementType_ElementTypeSelect      ElementType = 3
	ElementType_ElementTypeRadio       ElementType = 4
	ElementType_ElementTypeSwitch      ElementType = 5
)

func (ElementType) Descriptor

func (ElementType) Enum

func (x ElementType) Enum() *ElementType

func (ElementType) EnumDescriptor deprecated

func (ElementType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ElementType.Descriptor instead.

func (ElementType) Number

func (x ElementType) Number() protoreflect.EnumNumber

func (ElementType) String

func (x ElementType) String() string

func (ElementType) Type

type ElementValidationError

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

ElementValidationError is the validation error returned by Element.Validate if the designated constraints aren't met.

func (ElementValidationError) Cause

func (e ElementValidationError) Cause() error

Cause function returns cause value.

func (ElementValidationError) Error

func (e ElementValidationError) Error() string

Error satisfies the builtin error interface

func (ElementValidationError) ErrorName

func (e ElementValidationError) ErrorName() string

ErrorName returns error name.

func (ElementValidationError) Field

func (e ElementValidationError) Field() string

Field function returns field value.

func (ElementValidationError) Key

func (e ElementValidationError) Key() bool

Key function returns key value.

func (ElementValidationError) Reason

func (e ElementValidationError) Reason() string

Reason function returns reason value.

type MarsClient

type MarsClient interface {
	// Show 查看项目配置
	Show(ctx context.Context, in *MarsShowRequest, opts ...grpc.CallOption) (*MarsShowResponse, error)
	// GlobalConfig 查看项目 GlobalConfig 配置
	GlobalConfig(ctx context.Context, in *MarsGlobalConfigRequest, opts ...grpc.CallOption) (*MarsGlobalConfigResponse, error)
	// ToggleEnabled 开启/关闭全局配置
	ToggleEnabled(ctx context.Context, in *MarsToggleEnabledRequest, opts ...grpc.CallOption) (*MarsToggleEnabledResponse, error)
	// Update 更新全局配置
	Update(ctx context.Context, in *MarsUpdateRequest, opts ...grpc.CallOption) (*MarsUpdateResponse, error)
	// GetDefaultChartValues 获取项目 helm charts 的默认 values.yaml
	GetDefaultChartValues(ctx context.Context, in *MarsDefaultChartValuesRequest, opts ...grpc.CallOption) (*MarsDefaultChartValuesResponse, error)
}

MarsClient is the client API for Mars service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMarsClient

func NewMarsClient(cc grpc.ClientConnInterface) MarsClient

type MarsConfig

type MarsConfig struct {

	// config_file 指定项目下的默认配置文件, 也可以是别的项目的文件,格式为 "pid|branch|filename"
	ConfigFile string `protobuf:"bytes,1,opt,name=config_file,json=configFile,proto3" json:"config_file,omitempty"`
	// config_file_values 全局配置文件,如果没有 ConfigFile 则使用这个
	ConfigFileValues string `protobuf:"bytes,2,opt,name=config_file_values,json=configFileValues,proto3" json:"config_file_values,omitempty"`
	ConfigField      string `protobuf:"bytes,3,opt,name=config_field,json=configField,proto3" json:"config_field,omitempty"`
	IsSimpleEnv      bool   `protobuf:"varint,4,opt,name=is_simple_env,json=isSimpleEnv,proto3" json:"is_simple_env,omitempty"`
	// config_file_type 配置文件类型,php/env/yaml...
	ConfigFileType string `protobuf:"bytes,5,opt,name=config_file_type,json=configFileType,proto3" json:"config_file_type,omitempty"`
	// local_chart_path helm charts 目录, charts 文件在项目中存放的目录(必填), 也可以是别的项目的文件,格式为 "pid|branch|path"
	LocalChartPath string `protobuf:"bytes,6,opt,name=local_chart_path,json=localChartPath,proto3" json:"local_chart_path,omitempty"`
	// branches 启用的分支
	Branches []string `protobuf:"bytes,7,rep,name=branches,proto3" json:"branches,omitempty"`
	// values_yaml 和 values.yaml 一样
	ValuesYaml string `protobuf:"bytes,8,opt,name=values_yaml,json=valuesYaml,proto3" json:"values_yaml,omitempty"`
	// elements 自定义字段
	Elements []*Element `protobuf:"bytes,9,rep,name=elements,proto3" json:"elements,omitempty"`
	// contains filtered or unexported fields
}

func (*MarsConfig) Descriptor deprecated

func (*MarsConfig) Descriptor() ([]byte, []int)

Deprecated: Use MarsConfig.ProtoReflect.Descriptor instead.

func (*MarsConfig) GetBranches

func (x *MarsConfig) GetBranches() []string

func (*MarsConfig) GetConfigField

func (x *MarsConfig) GetConfigField() string

func (*MarsConfig) GetConfigFile

func (x *MarsConfig) GetConfigFile() string

func (*MarsConfig) GetConfigFileType

func (x *MarsConfig) GetConfigFileType() string

func (*MarsConfig) GetConfigFileValues

func (x *MarsConfig) GetConfigFileValues() string

func (*MarsConfig) GetElements

func (x *MarsConfig) GetElements() []*Element

func (*MarsConfig) GetIsSimpleEnv

func (x *MarsConfig) GetIsSimpleEnv() bool

func (*MarsConfig) GetLocalChartPath

func (x *MarsConfig) GetLocalChartPath() string

func (*MarsConfig) GetValuesYaml

func (x *MarsConfig) GetValuesYaml() string

func (*MarsConfig) ProtoMessage

func (*MarsConfig) ProtoMessage()

func (*MarsConfig) ProtoReflect

func (x *MarsConfig) ProtoReflect() protoreflect.Message

func (*MarsConfig) Reset

func (x *MarsConfig) Reset()

func (*MarsConfig) String

func (x *MarsConfig) String() string

func (*MarsConfig) Validate

func (m *MarsConfig) Validate() error

Validate checks the field values on MarsConfig with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MarsConfig) ValidateAll

func (m *MarsConfig) ValidateAll() error

ValidateAll checks the field values on MarsConfig with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarsConfigMultiError, or nil if none found.

type MarsConfigMultiError

type MarsConfigMultiError []error

MarsConfigMultiError is an error wrapping multiple validation errors returned by MarsConfig.ValidateAll() if the designated constraints aren't met.

func (MarsConfigMultiError) AllErrors

func (m MarsConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MarsConfigMultiError) Error

func (m MarsConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type MarsConfigValidationError

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

MarsConfigValidationError is the validation error returned by MarsConfig.Validate if the designated constraints aren't met.

func (MarsConfigValidationError) Cause

func (e MarsConfigValidationError) Cause() error

Cause function returns cause value.

func (MarsConfigValidationError) Error

Error satisfies the builtin error interface

func (MarsConfigValidationError) ErrorName

func (e MarsConfigValidationError) ErrorName() string

ErrorName returns error name.

func (MarsConfigValidationError) Field

Field function returns field value.

func (MarsConfigValidationError) Key

Key function returns key value.

func (MarsConfigValidationError) Reason

func (e MarsConfigValidationError) Reason() string

Reason function returns reason value.

type MarsDefaultChartValuesRequest

type MarsDefaultChartValuesRequest struct {
	ProjectId int64  `protobuf:"varint,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	Branch    string `protobuf:"bytes,2,opt,name=branch,proto3" json:"branch,omitempty"`
	// contains filtered or unexported fields
}

func (*MarsDefaultChartValuesRequest) Descriptor deprecated

func (*MarsDefaultChartValuesRequest) Descriptor() ([]byte, []int)

Deprecated: Use MarsDefaultChartValuesRequest.ProtoReflect.Descriptor instead.

func (*MarsDefaultChartValuesRequest) GetBranch

func (x *MarsDefaultChartValuesRequest) GetBranch() string

func (*MarsDefaultChartValuesRequest) GetProjectId

func (x *MarsDefaultChartValuesRequest) GetProjectId() int64

func (*MarsDefaultChartValuesRequest) ProtoMessage

func (*MarsDefaultChartValuesRequest) ProtoMessage()

func (*MarsDefaultChartValuesRequest) ProtoReflect

func (*MarsDefaultChartValuesRequest) Reset

func (x *MarsDefaultChartValuesRequest) Reset()

func (*MarsDefaultChartValuesRequest) String

func (*MarsDefaultChartValuesRequest) Validate

func (m *MarsDefaultChartValuesRequest) Validate() error

Validate checks the field values on MarsDefaultChartValuesRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MarsDefaultChartValuesRequest) ValidateAll

func (m *MarsDefaultChartValuesRequest) ValidateAll() error

ValidateAll checks the field values on MarsDefaultChartValuesRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarsDefaultChartValuesRequestMultiError, or nil if none found.

type MarsDefaultChartValuesRequestMultiError

type MarsDefaultChartValuesRequestMultiError []error

MarsDefaultChartValuesRequestMultiError is an error wrapping multiple validation errors returned by MarsDefaultChartValuesRequest.ValidateAll() if the designated constraints aren't met.

func (MarsDefaultChartValuesRequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (MarsDefaultChartValuesRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MarsDefaultChartValuesRequestValidationError

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

MarsDefaultChartValuesRequestValidationError is the validation error returned by MarsDefaultChartValuesRequest.Validate if the designated constraints aren't met.

func (MarsDefaultChartValuesRequestValidationError) Cause

Cause function returns cause value.

func (MarsDefaultChartValuesRequestValidationError) Error

Error satisfies the builtin error interface

func (MarsDefaultChartValuesRequestValidationError) ErrorName

ErrorName returns error name.

func (MarsDefaultChartValuesRequestValidationError) Field

Field function returns field value.

func (MarsDefaultChartValuesRequestValidationError) Key

Key function returns key value.

func (MarsDefaultChartValuesRequestValidationError) Reason

Reason function returns reason value.

type MarsDefaultChartValuesResponse

type MarsDefaultChartValuesResponse struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*MarsDefaultChartValuesResponse) Descriptor deprecated

func (*MarsDefaultChartValuesResponse) Descriptor() ([]byte, []int)

Deprecated: Use MarsDefaultChartValuesResponse.ProtoReflect.Descriptor instead.

func (*MarsDefaultChartValuesResponse) GetValue

func (x *MarsDefaultChartValuesResponse) GetValue() string

func (*MarsDefaultChartValuesResponse) ProtoMessage

func (*MarsDefaultChartValuesResponse) ProtoMessage()

func (*MarsDefaultChartValuesResponse) ProtoReflect

func (*MarsDefaultChartValuesResponse) Reset

func (x *MarsDefaultChartValuesResponse) Reset()

func (*MarsDefaultChartValuesResponse) String

func (*MarsDefaultChartValuesResponse) Validate

func (m *MarsDefaultChartValuesResponse) Validate() error

Validate checks the field values on MarsDefaultChartValuesResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MarsDefaultChartValuesResponse) ValidateAll

func (m *MarsDefaultChartValuesResponse) ValidateAll() error

ValidateAll checks the field values on MarsDefaultChartValuesResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarsDefaultChartValuesResponseMultiError, or nil if none found.

type MarsDefaultChartValuesResponseMultiError

type MarsDefaultChartValuesResponseMultiError []error

MarsDefaultChartValuesResponseMultiError is an error wrapping multiple validation errors returned by MarsDefaultChartValuesResponse.ValidateAll() if the designated constraints aren't met.

func (MarsDefaultChartValuesResponseMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (MarsDefaultChartValuesResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MarsDefaultChartValuesResponseValidationError

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

MarsDefaultChartValuesResponseValidationError is the validation error returned by MarsDefaultChartValuesResponse.Validate if the designated constraints aren't met.

func (MarsDefaultChartValuesResponseValidationError) Cause

Cause function returns cause value.

func (MarsDefaultChartValuesResponseValidationError) Error

Error satisfies the builtin error interface

func (MarsDefaultChartValuesResponseValidationError) ErrorName

ErrorName returns error name.

func (MarsDefaultChartValuesResponseValidationError) Field

Field function returns field value.

func (MarsDefaultChartValuesResponseValidationError) Key

Key function returns key value.

func (MarsDefaultChartValuesResponseValidationError) Reason

Reason function returns reason value.

type MarsGlobalConfigRequest

type MarsGlobalConfigRequest struct {
	ProjectId int64 `protobuf:"varint,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// contains filtered or unexported fields
}

func (*MarsGlobalConfigRequest) Descriptor deprecated

func (*MarsGlobalConfigRequest) Descriptor() ([]byte, []int)

Deprecated: Use MarsGlobalConfigRequest.ProtoReflect.Descriptor instead.

func (*MarsGlobalConfigRequest) GetProjectId

func (x *MarsGlobalConfigRequest) GetProjectId() int64

func (*MarsGlobalConfigRequest) ProtoMessage

func (*MarsGlobalConfigRequest) ProtoMessage()

func (*MarsGlobalConfigRequest) ProtoReflect

func (x *MarsGlobalConfigRequest) ProtoReflect() protoreflect.Message

func (*MarsGlobalConfigRequest) Reset

func (x *MarsGlobalConfigRequest) Reset()

func (*MarsGlobalConfigRequest) String

func (x *MarsGlobalConfigRequest) String() string

func (*MarsGlobalConfigRequest) Validate

func (m *MarsGlobalConfigRequest) Validate() error

Validate checks the field values on MarsGlobalConfigRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MarsGlobalConfigRequest) ValidateAll

func (m *MarsGlobalConfigRequest) ValidateAll() error

ValidateAll checks the field values on MarsGlobalConfigRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarsGlobalConfigRequestMultiError, or nil if none found.

type MarsGlobalConfigRequestMultiError

type MarsGlobalConfigRequestMultiError []error

MarsGlobalConfigRequestMultiError is an error wrapping multiple validation errors returned by MarsGlobalConfigRequest.ValidateAll() if the designated constraints aren't met.

func (MarsGlobalConfigRequestMultiError) AllErrors

func (m MarsGlobalConfigRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MarsGlobalConfigRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MarsGlobalConfigRequestValidationError

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

MarsGlobalConfigRequestValidationError is the validation error returned by MarsGlobalConfigRequest.Validate if the designated constraints aren't met.

func (MarsGlobalConfigRequestValidationError) Cause

Cause function returns cause value.

func (MarsGlobalConfigRequestValidationError) Error

Error satisfies the builtin error interface

func (MarsGlobalConfigRequestValidationError) ErrorName

ErrorName returns error name.

func (MarsGlobalConfigRequestValidationError) Field

Field function returns field value.

func (MarsGlobalConfigRequestValidationError) Key

Key function returns key value.

func (MarsGlobalConfigRequestValidationError) Reason

Reason function returns reason value.

type MarsGlobalConfigResponse

type MarsGlobalConfigResponse struct {
	Enabled bool        `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	Config  *MarsConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*MarsGlobalConfigResponse) Descriptor deprecated

func (*MarsGlobalConfigResponse) Descriptor() ([]byte, []int)

Deprecated: Use MarsGlobalConfigResponse.ProtoReflect.Descriptor instead.

func (*MarsGlobalConfigResponse) GetConfig

func (x *MarsGlobalConfigResponse) GetConfig() *MarsConfig

func (*MarsGlobalConfigResponse) GetEnabled

func (x *MarsGlobalConfigResponse) GetEnabled() bool

func (*MarsGlobalConfigResponse) ProtoMessage

func (*MarsGlobalConfigResponse) ProtoMessage()

func (*MarsGlobalConfigResponse) ProtoReflect

func (x *MarsGlobalConfigResponse) ProtoReflect() protoreflect.Message

func (*MarsGlobalConfigResponse) Reset

func (x *MarsGlobalConfigResponse) Reset()

func (*MarsGlobalConfigResponse) String

func (x *MarsGlobalConfigResponse) String() string

func (*MarsGlobalConfigResponse) Validate

func (m *MarsGlobalConfigResponse) Validate() error

Validate checks the field values on MarsGlobalConfigResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MarsGlobalConfigResponse) ValidateAll

func (m *MarsGlobalConfigResponse) ValidateAll() error

ValidateAll checks the field values on MarsGlobalConfigResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarsGlobalConfigResponseMultiError, or nil if none found.

type MarsGlobalConfigResponseMultiError

type MarsGlobalConfigResponseMultiError []error

MarsGlobalConfigResponseMultiError is an error wrapping multiple validation errors returned by MarsGlobalConfigResponse.ValidateAll() if the designated constraints aren't met.

func (MarsGlobalConfigResponseMultiError) AllErrors

func (m MarsGlobalConfigResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MarsGlobalConfigResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MarsGlobalConfigResponseValidationError

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

MarsGlobalConfigResponseValidationError is the validation error returned by MarsGlobalConfigResponse.Validate if the designated constraints aren't met.

func (MarsGlobalConfigResponseValidationError) Cause

Cause function returns cause value.

func (MarsGlobalConfigResponseValidationError) Error

Error satisfies the builtin error interface

func (MarsGlobalConfigResponseValidationError) ErrorName

ErrorName returns error name.

func (MarsGlobalConfigResponseValidationError) Field

Field function returns field value.

func (MarsGlobalConfigResponseValidationError) Key

Key function returns key value.

func (MarsGlobalConfigResponseValidationError) Reason

Reason function returns reason value.

type MarsServer

type MarsServer interface {
	// Show 查看项目配置
	Show(context.Context, *MarsShowRequest) (*MarsShowResponse, error)
	// GlobalConfig 查看项目 GlobalConfig 配置
	GlobalConfig(context.Context, *MarsGlobalConfigRequest) (*MarsGlobalConfigResponse, error)
	// ToggleEnabled 开启/关闭全局配置
	ToggleEnabled(context.Context, *MarsToggleEnabledRequest) (*MarsToggleEnabledResponse, error)
	// Update 更新全局配置
	Update(context.Context, *MarsUpdateRequest) (*MarsUpdateResponse, error)
	// GetDefaultChartValues 获取项目 helm charts 的默认 values.yaml
	GetDefaultChartValues(context.Context, *MarsDefaultChartValuesRequest) (*MarsDefaultChartValuesResponse, error)
	// contains filtered or unexported methods
}

MarsServer is the server API for Mars service. All implementations must embed UnimplementedMarsServer for forward compatibility

type MarsShowRequest

type MarsShowRequest struct {
	ProjectId int64  `protobuf:"varint,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	Branch    string `protobuf:"bytes,2,opt,name=branch,proto3" json:"branch,omitempty"`
	// contains filtered or unexported fields
}

func (*MarsShowRequest) Descriptor deprecated

func (*MarsShowRequest) Descriptor() ([]byte, []int)

Deprecated: Use MarsShowRequest.ProtoReflect.Descriptor instead.

func (*MarsShowRequest) GetBranch

func (x *MarsShowRequest) GetBranch() string

func (*MarsShowRequest) GetProjectId

func (x *MarsShowRequest) GetProjectId() int64

func (*MarsShowRequest) ProtoMessage

func (*MarsShowRequest) ProtoMessage()

func (*MarsShowRequest) ProtoReflect

func (x *MarsShowRequest) ProtoReflect() protoreflect.Message

func (*MarsShowRequest) Reset

func (x *MarsShowRequest) Reset()

func (*MarsShowRequest) String

func (x *MarsShowRequest) String() string

func (*MarsShowRequest) Validate

func (m *MarsShowRequest) Validate() error

Validate checks the field values on MarsShowRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MarsShowRequest) ValidateAll

func (m *MarsShowRequest) ValidateAll() error

ValidateAll checks the field values on MarsShowRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarsShowRequestMultiError, or nil if none found.

type MarsShowRequestMultiError

type MarsShowRequestMultiError []error

MarsShowRequestMultiError is an error wrapping multiple validation errors returned by MarsShowRequest.ValidateAll() if the designated constraints aren't met.

func (MarsShowRequestMultiError) AllErrors

func (m MarsShowRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MarsShowRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MarsShowRequestValidationError

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

MarsShowRequestValidationError is the validation error returned by MarsShowRequest.Validate if the designated constraints aren't met.

func (MarsShowRequestValidationError) Cause

Cause function returns cause value.

func (MarsShowRequestValidationError) Error

Error satisfies the builtin error interface

func (MarsShowRequestValidationError) ErrorName

func (e MarsShowRequestValidationError) ErrorName() string

ErrorName returns error name.

func (MarsShowRequestValidationError) Field

Field function returns field value.

func (MarsShowRequestValidationError) Key

Key function returns key value.

func (MarsShowRequestValidationError) Reason

Reason function returns reason value.

type MarsShowResponse

type MarsShowResponse struct {
	Branch string      `protobuf:"bytes,1,opt,name=branch,proto3" json:"branch,omitempty"`
	Config *MarsConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*MarsShowResponse) Descriptor deprecated

func (*MarsShowResponse) Descriptor() ([]byte, []int)

Deprecated: Use MarsShowResponse.ProtoReflect.Descriptor instead.

func (*MarsShowResponse) GetBranch

func (x *MarsShowResponse) GetBranch() string

func (*MarsShowResponse) GetConfig

func (x *MarsShowResponse) GetConfig() *MarsConfig

func (*MarsShowResponse) ProtoMessage

func (*MarsShowResponse) ProtoMessage()

func (*MarsShowResponse) ProtoReflect

func (x *MarsShowResponse) ProtoReflect() protoreflect.Message

func (*MarsShowResponse) Reset

func (x *MarsShowResponse) Reset()

func (*MarsShowResponse) String

func (x *MarsShowResponse) String() string

func (*MarsShowResponse) Validate

func (m *MarsShowResponse) Validate() error

Validate checks the field values on MarsShowResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MarsShowResponse) ValidateAll

func (m *MarsShowResponse) ValidateAll() error

ValidateAll checks the field values on MarsShowResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarsShowResponseMultiError, or nil if none found.

type MarsShowResponseMultiError

type MarsShowResponseMultiError []error

MarsShowResponseMultiError is an error wrapping multiple validation errors returned by MarsShowResponse.ValidateAll() if the designated constraints aren't met.

func (MarsShowResponseMultiError) AllErrors

func (m MarsShowResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MarsShowResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MarsShowResponseValidationError

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

MarsShowResponseValidationError is the validation error returned by MarsShowResponse.Validate if the designated constraints aren't met.

func (MarsShowResponseValidationError) Cause

Cause function returns cause value.

func (MarsShowResponseValidationError) Error

Error satisfies the builtin error interface

func (MarsShowResponseValidationError) ErrorName

ErrorName returns error name.

func (MarsShowResponseValidationError) Field

Field function returns field value.

func (MarsShowResponseValidationError) Key

Key function returns key value.

func (MarsShowResponseValidationError) Reason

Reason function returns reason value.

type MarsToggleEnabledRequest

type MarsToggleEnabledRequest struct {
	ProjectId int64 `protobuf:"varint,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	Enabled   bool  `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// contains filtered or unexported fields
}

func (*MarsToggleEnabledRequest) Descriptor deprecated

func (*MarsToggleEnabledRequest) Descriptor() ([]byte, []int)

Deprecated: Use MarsToggleEnabledRequest.ProtoReflect.Descriptor instead.

func (*MarsToggleEnabledRequest) GetEnabled

func (x *MarsToggleEnabledRequest) GetEnabled() bool

func (*MarsToggleEnabledRequest) GetProjectId

func (x *MarsToggleEnabledRequest) GetProjectId() int64

func (*MarsToggleEnabledRequest) ProtoMessage

func (*MarsToggleEnabledRequest) ProtoMessage()

func (*MarsToggleEnabledRequest) ProtoReflect

func (x *MarsToggleEnabledRequest) ProtoReflect() protoreflect.Message

func (*MarsToggleEnabledRequest) Reset

func (x *MarsToggleEnabledRequest) Reset()

func (*MarsToggleEnabledRequest) String

func (x *MarsToggleEnabledRequest) String() string

func (*MarsToggleEnabledRequest) Validate

func (m *MarsToggleEnabledRequest) Validate() error

Validate checks the field values on MarsToggleEnabledRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MarsToggleEnabledRequest) ValidateAll

func (m *MarsToggleEnabledRequest) ValidateAll() error

ValidateAll checks the field values on MarsToggleEnabledRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarsToggleEnabledRequestMultiError, or nil if none found.

type MarsToggleEnabledRequestMultiError

type MarsToggleEnabledRequestMultiError []error

MarsToggleEnabledRequestMultiError is an error wrapping multiple validation errors returned by MarsToggleEnabledRequest.ValidateAll() if the designated constraints aren't met.

func (MarsToggleEnabledRequestMultiError) AllErrors

func (m MarsToggleEnabledRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MarsToggleEnabledRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MarsToggleEnabledRequestValidationError

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

MarsToggleEnabledRequestValidationError is the validation error returned by MarsToggleEnabledRequest.Validate if the designated constraints aren't met.

func (MarsToggleEnabledRequestValidationError) Cause

Cause function returns cause value.

func (MarsToggleEnabledRequestValidationError) Error

Error satisfies the builtin error interface

func (MarsToggleEnabledRequestValidationError) ErrorName

ErrorName returns error name.

func (MarsToggleEnabledRequestValidationError) Field

Field function returns field value.

func (MarsToggleEnabledRequestValidationError) Key

Key function returns key value.

func (MarsToggleEnabledRequestValidationError) Reason

Reason function returns reason value.

type MarsToggleEnabledResponse

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

func (*MarsToggleEnabledResponse) Descriptor deprecated

func (*MarsToggleEnabledResponse) Descriptor() ([]byte, []int)

Deprecated: Use MarsToggleEnabledResponse.ProtoReflect.Descriptor instead.

func (*MarsToggleEnabledResponse) ProtoMessage

func (*MarsToggleEnabledResponse) ProtoMessage()

func (*MarsToggleEnabledResponse) ProtoReflect

func (*MarsToggleEnabledResponse) Reset

func (x *MarsToggleEnabledResponse) Reset()

func (*MarsToggleEnabledResponse) String

func (x *MarsToggleEnabledResponse) String() string

func (*MarsToggleEnabledResponse) Validate

func (m *MarsToggleEnabledResponse) Validate() error

Validate checks the field values on MarsToggleEnabledResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MarsToggleEnabledResponse) ValidateAll

func (m *MarsToggleEnabledResponse) ValidateAll() error

ValidateAll checks the field values on MarsToggleEnabledResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarsToggleEnabledResponseMultiError, or nil if none found.

type MarsToggleEnabledResponseMultiError

type MarsToggleEnabledResponseMultiError []error

MarsToggleEnabledResponseMultiError is an error wrapping multiple validation errors returned by MarsToggleEnabledResponse.ValidateAll() if the designated constraints aren't met.

func (MarsToggleEnabledResponseMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (MarsToggleEnabledResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MarsToggleEnabledResponseValidationError

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

MarsToggleEnabledResponseValidationError is the validation error returned by MarsToggleEnabledResponse.Validate if the designated constraints aren't met.

func (MarsToggleEnabledResponseValidationError) Cause

Cause function returns cause value.

func (MarsToggleEnabledResponseValidationError) Error

Error satisfies the builtin error interface

func (MarsToggleEnabledResponseValidationError) ErrorName

ErrorName returns error name.

func (MarsToggleEnabledResponseValidationError) Field

Field function returns field value.

func (MarsToggleEnabledResponseValidationError) Key

Key function returns key value.

func (MarsToggleEnabledResponseValidationError) Reason

Reason function returns reason value.

type MarsUpdateRequest

type MarsUpdateRequest struct {
	ProjectId int64       `protobuf:"varint,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	Config    *MarsConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*MarsUpdateRequest) Descriptor deprecated

func (*MarsUpdateRequest) Descriptor() ([]byte, []int)

Deprecated: Use MarsUpdateRequest.ProtoReflect.Descriptor instead.

func (*MarsUpdateRequest) GetConfig

func (x *MarsUpdateRequest) GetConfig() *MarsConfig

func (*MarsUpdateRequest) GetProjectId

func (x *MarsUpdateRequest) GetProjectId() int64

func (*MarsUpdateRequest) ProtoMessage

func (*MarsUpdateRequest) ProtoMessage()

func (*MarsUpdateRequest) ProtoReflect

func (x *MarsUpdateRequest) ProtoReflect() protoreflect.Message

func (*MarsUpdateRequest) Reset

func (x *MarsUpdateRequest) Reset()

func (*MarsUpdateRequest) String

func (x *MarsUpdateRequest) String() string

func (*MarsUpdateRequest) Validate

func (m *MarsUpdateRequest) Validate() error

Validate checks the field values on MarsUpdateRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MarsUpdateRequest) ValidateAll

func (m *MarsUpdateRequest) ValidateAll() error

ValidateAll checks the field values on MarsUpdateRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarsUpdateRequestMultiError, or nil if none found.

type MarsUpdateRequestMultiError

type MarsUpdateRequestMultiError []error

MarsUpdateRequestMultiError is an error wrapping multiple validation errors returned by MarsUpdateRequest.ValidateAll() if the designated constraints aren't met.

func (MarsUpdateRequestMultiError) AllErrors

func (m MarsUpdateRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MarsUpdateRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MarsUpdateRequestValidationError

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

MarsUpdateRequestValidationError is the validation error returned by MarsUpdateRequest.Validate if the designated constraints aren't met.

func (MarsUpdateRequestValidationError) Cause

Cause function returns cause value.

func (MarsUpdateRequestValidationError) Error

Error satisfies the builtin error interface

func (MarsUpdateRequestValidationError) ErrorName

ErrorName returns error name.

func (MarsUpdateRequestValidationError) Field

Field function returns field value.

func (MarsUpdateRequestValidationError) Key

Key function returns key value.

func (MarsUpdateRequestValidationError) Reason

Reason function returns reason value.

type MarsUpdateResponse

type MarsUpdateResponse struct {
	Config *MarsConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*MarsUpdateResponse) Descriptor deprecated

func (*MarsUpdateResponse) Descriptor() ([]byte, []int)

Deprecated: Use MarsUpdateResponse.ProtoReflect.Descriptor instead.

func (*MarsUpdateResponse) GetConfig

func (x *MarsUpdateResponse) GetConfig() *MarsConfig

func (*MarsUpdateResponse) ProtoMessage

func (*MarsUpdateResponse) ProtoMessage()

func (*MarsUpdateResponse) ProtoReflect

func (x *MarsUpdateResponse) ProtoReflect() protoreflect.Message

func (*MarsUpdateResponse) Reset

func (x *MarsUpdateResponse) Reset()

func (*MarsUpdateResponse) String

func (x *MarsUpdateResponse) String() string

func (*MarsUpdateResponse) Validate

func (m *MarsUpdateResponse) Validate() error

Validate checks the field values on MarsUpdateResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MarsUpdateResponse) ValidateAll

func (m *MarsUpdateResponse) ValidateAll() error

ValidateAll checks the field values on MarsUpdateResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MarsUpdateResponseMultiError, or nil if none found.

type MarsUpdateResponseMultiError

type MarsUpdateResponseMultiError []error

MarsUpdateResponseMultiError is an error wrapping multiple validation errors returned by MarsUpdateResponse.ValidateAll() if the designated constraints aren't met.

func (MarsUpdateResponseMultiError) AllErrors

func (m MarsUpdateResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MarsUpdateResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MarsUpdateResponseValidationError

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

MarsUpdateResponseValidationError is the validation error returned by MarsUpdateResponse.Validate if the designated constraints aren't met.

func (MarsUpdateResponseValidationError) Cause

Cause function returns cause value.

func (MarsUpdateResponseValidationError) Error

Error satisfies the builtin error interface

func (MarsUpdateResponseValidationError) ErrorName

ErrorName returns error name.

func (MarsUpdateResponseValidationError) Field

Field function returns field value.

func (MarsUpdateResponseValidationError) Key

Key function returns key value.

func (MarsUpdateResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedMarsServer

type UnimplementedMarsServer struct {
}

UnimplementedMarsServer must be embedded to have forward compatible implementations.

func (UnimplementedMarsServer) Show

func (UnimplementedMarsServer) Update

type UnsafeMarsServer

type UnsafeMarsServer interface {
	// contains filtered or unexported methods
}

UnsafeMarsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MarsServer will result in compilation errors.

Jump to

Keyboard shortcuts

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