Documentation ¶
Index ¶
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetBranches() []string
- func (x *Config) GetConfigField() string
- func (x *Config) GetConfigFile() string
- func (x *Config) GetConfigFileType() string
- func (x *Config) GetConfigFileValues() string
- func (x *Config) GetDisplayName() string
- func (x *Config) GetElements() []*Element
- func (x *Config) GetIsSimpleEnv() bool
- func (x *Config) GetLocalChartPath() string
- func (x *Config) GetValuesYaml() string
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (m *Config) Validate() error
- func (m *Config) ValidateAll() error
- type ConfigMultiError
- type ConfigValidationError
- type Element
- func (*Element) Descriptor() ([]byte, []int)deprecated
- func (x *Element) GetDefault() string
- func (x *Element) GetDescription() string
- func (x *Element) GetOrder() uint32
- func (x *Element) GetPath() string
- func (x *Element) GetSelectValues() []string
- func (x *Element) GetType() ElementType
- func (*Element) ProtoMessage()
- func (x *Element) ProtoReflect() protoreflect.Message
- func (x *Element) Reset()
- func (x *Element) String() string
- func (m *Element) Validate() error
- func (m *Element) ValidateAll() error
- type ElementMultiError
- type ElementType
- func (ElementType) Descriptor() protoreflect.EnumDescriptor
- func (x ElementType) Enum() *ElementType
- func (ElementType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ElementType) Number() protoreflect.EnumNumber
- func (x ElementType) String() string
- func (ElementType) Type() protoreflect.EnumType
- type ElementValidationError
Constants ¶
This section is empty.
Variables ¶
var ( ElementType_name = map[int32]string{ 0: "ElementTypeUnknown", 1: "ElementTypeInput", 2: "ElementTypeInputNumber", 3: "ElementTypeSelect", 4: "ElementTypeRadio", 5: "ElementTypeSwitch", 6: "ElementTypeTextArea", 7: "ElementTypeNumberSelect", 8: "ElementTypeNumberRadio", } ElementType_value = map[string]int32{ "ElementTypeUnknown": 0, "ElementTypeInput": 1, "ElementTypeInputNumber": 2, "ElementTypeSelect": 3, "ElementTypeRadio": 4, "ElementTypeSwitch": 5, "ElementTypeTextArea": 6, "ElementTypeNumberSelect": 7, "ElementTypeNumberRadio": 8, } )
Enum value maps for ElementType.
var File_mars_mars_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config 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"` // 显示的名称 (helm app name), 不填就使用 git server project name // 以字母开头结尾,中间可以有 '_' '-' DisplayName string `protobuf:"bytes,10,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetBranches ¶
func (*Config) GetConfigField ¶
func (*Config) GetConfigFile ¶
func (*Config) GetConfigFileType ¶
func (*Config) GetConfigFileValues ¶
func (*Config) GetDisplayName ¶
func (*Config) GetElements ¶
func (*Config) GetIsSimpleEnv ¶
func (*Config) GetLocalChartPath ¶
func (*Config) GetValuesYaml ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
func (*Config) Validate ¶
Validate checks the field values on Config 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 (*Config) ValidateAll ¶
ValidateAll checks the field values on Config 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 ConfigMultiError, or nil if none found.
type ConfigMultiError ¶
type ConfigMultiError []error
ConfigMultiError is an error wrapping multiple validation errors returned by Config.ValidateAll() if the designated constraints aren't met.
func (ConfigMultiError) AllErrors ¶
func (m ConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConfigMultiError) Error ¶
func (m ConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConfigValidationError ¶
type ConfigValidationError struct {
// contains filtered or unexported fields
}
ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.
func (ConfigValidationError) Cause ¶
func (e ConfigValidationError) Cause() error
Cause function returns cause value.
func (ConfigValidationError) Error ¶
func (e ConfigValidationError) Error() string
Error satisfies the builtin error interface
func (ConfigValidationError) ErrorName ¶
func (e ConfigValidationError) ErrorName() string
ErrorName returns error name.
func (ConfigValidationError) Field ¶
func (e ConfigValidationError) Field() string
Field function returns field value.
func (ConfigValidationError) Key ¶
func (e ConfigValidationError) Key() bool
Key function returns key value.
func (ConfigValidationError) Reason ¶
func (e ConfigValidationError) Reason() string
Reason function returns reason value.
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=mars.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"` Order uint32 `protobuf:"varint,7,opt,name=order,proto3" json:"order,omitempty"` // contains filtered or unexported fields }
func (*Element) Descriptor
deprecated
func (*Element) GetDefault ¶
func (*Element) GetDescription ¶
func (*Element) GetSelectValues ¶
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) Validate ¶
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 ¶
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 ElementType_ElementTypeTextArea ElementType = 6 ElementType_ElementTypeNumberSelect ElementType = 7 ElementType_ElementTypeNumberRadio ElementType = 8 )
func (ElementType) Descriptor ¶
func (ElementType) Descriptor() protoreflect.EnumDescriptor
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 ¶
func (ElementType) Type() protoreflect.EnumType
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.