mars

package
v4.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

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",
		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.

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetBranches

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

func (*Config) GetConfigField

func (x *Config) GetConfigField() string

func (*Config) GetConfigFile

func (x *Config) GetConfigFile() string

func (*Config) GetConfigFileType

func (x *Config) GetConfigFileType() string

func (*Config) GetConfigFileValues

func (x *Config) GetConfigFileValues() string

func (*Config) GetDisplayName

func (x *Config) GetDisplayName() string

func (*Config) GetElements

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

func (*Config) GetIsSimpleEnv

func (x *Config) GetIsSimpleEnv() bool

func (*Config) GetLocalChartPath

func (x *Config) GetLocalChartPath() string

func (*Config) GetValuesYaml

func (x *Config) GetValuesYaml() string

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (m *Config) Validate() error

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

func (m *Config) ValidateAll() error

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) 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) GetOrder

func (x *Element) GetOrder() uint32

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
	ElementType_ElementTypeTextArea     ElementType = 6
	ElementType_ElementTypeNumberSelect ElementType = 7
	ElementType_ElementTypeNumberRadio  ElementType = 8
)

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.

Jump to

Keyboard shortcuts

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