tag

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "tag"
)

Variables

View Source
var (
	ScopeType_name = map[int32]string{
		0: "NAMESPACE",
		1: "DOMAIN",
		2: "GLOBAL",
	}
	ScopeType_value = map[string]int32{
		"NAMESPACE": 0,
		"DOMAIN":    1,
		"GLOBAL":    2,
	}
)

Enum value maps for ScopeType.

View Source
var (
	ValueFrom_name = map[int32]string{
		0: "MANUAL",
		1: "HTTP",
	}
	ValueFrom_value = map[string]int32{
		"MANUAL": 0,
		"HTTP":   1,
	}
)

Enum value maps for ValueFrom.

View Source
var File_apps_tag_pb_enum_proto protoreflect.FileDescriptor
View Source
var File_apps_tag_pb_request_proto protoreflect.FileDescriptor
View Source
var File_apps_tag_pb_service_proto protoreflect.FileDescriptor
View Source
var File_apps_tag_pb_tag_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "infraboard.keyauth.tag.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateTag",
			Handler:    _Service_CreateTag_Handler,
		},
		{
			MethodName: "DescribeTag",
			Handler:    _Service_DescribeTag_Handler,
		},
		{
			MethodName: "DeleteTag",
			Handler:    _Service_DeleteTag_Handler,
		},
		{
			MethodName: "QueryTagKey",
			Handler:    _Service_QueryTagKey_Handler,
		},
		{
			MethodName: "QueryTagValue",
			Handler:    _Service_QueryTagValue_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "apps/tag/pb/service.proto",
}

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

Functions

func HttpEntry

func HttpEntry() *http.EntrySet

HttpEntry todo

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type CreateTagRequest

type CreateTagRequest struct {

	// tag生效范围
	// @gotags: json:"scope_type"
	ScopeType ScopeType `protobuf:"varint,1,opt,name=scope_type,json=scopeType,proto3,enum=infraboard.keyauth.tag.ScopeType" json:"scope_type"`
	// tag属于哪个namespace
	// @gotags: json:"namespace"
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace"`
	// 建名称
	// @gotags: json:"key_name" validate:"lte=200"
	KeyName string `protobuf:"bytes,3,opt,name=key_name,json=keyName,proto3" json:"key_name" validate:"lte=200"`
	// 建标识
	// @gotags: json:"key_label"
	KeyLabel string `protobuf:"bytes,4,opt,name=key_label,json=keyLabel,proto3" json:"key_label"`
	// 建描述
	// @gotags: json:"key_desc"
	KeyDesc string `protobuf:"bytes,5,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc"`
	// 值来源
	// @gotags: json:"value_from"
	ValueFrom ValueFrom `protobuf:"varint,6,opt,name=value_from,json=valueFrom,proto3,enum=infraboard.keyauth.tag.ValueFrom" json:"value_from"`
	// http 获取Tag 值的参数
	// @gotags: json:"http_from_option"
	HttpFromOption *HTTPFromOption `protobuf:"bytes,7,opt,name=http_from_option,json=httpFromOption,proto3" json:"http_from_option"`
	// String 类型的值
	// @gotags: json:"values"
	Values []*ValueOption `protobuf:"bytes,8,rep,name=values,proto3" json:"values"`
	// Tag所属的域
	// @gotags: json:"domain"
	Domain string `protobuf:"bytes,9,opt,name=domain,proto3" json:"domain"`
	// 创建人
	// @gotags: json:"creater"
	Creater string `protobuf:"bytes,10,opt,name=creater,proto3" json:"creater"`
	// contains filtered or unexported fields
}

CreateTagRequest todo

func NewCreateTagRequest

func NewCreateTagRequest() *CreateTagRequest

NewCreateTagRequest 实例化请求

func (*CreateTagRequest) Descriptor deprecated

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

Deprecated: Use CreateTagRequest.ProtoReflect.Descriptor instead.

func (*CreateTagRequest) GenUUID

func (req *CreateTagRequest) GenUUID() string

func (*CreateTagRequest) GetCreater

func (x *CreateTagRequest) GetCreater() string

func (*CreateTagRequest) GetDomain

func (x *CreateTagRequest) GetDomain() string

func (*CreateTagRequest) GetHttpFromOption

func (x *CreateTagRequest) GetHttpFromOption() *HTTPFromOption

func (*CreateTagRequest) GetKeyDesc

func (x *CreateTagRequest) GetKeyDesc() string

func (*CreateTagRequest) GetKeyLabel

func (x *CreateTagRequest) GetKeyLabel() string

func (*CreateTagRequest) GetKeyName

func (x *CreateTagRequest) GetKeyName() string

func (*CreateTagRequest) GetNamespace

func (x *CreateTagRequest) GetNamespace() string

func (*CreateTagRequest) GetScopeType

func (x *CreateTagRequest) GetScopeType() ScopeType

func (*CreateTagRequest) GetValueFrom

func (x *CreateTagRequest) GetValueFrom() ValueFrom

func (*CreateTagRequest) GetValues

func (x *CreateTagRequest) GetValues() []*ValueOption

func (*CreateTagRequest) ProtoMessage

func (*CreateTagRequest) ProtoMessage()

func (*CreateTagRequest) ProtoReflect

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

func (*CreateTagRequest) Reset

func (x *CreateTagRequest) Reset()

func (*CreateTagRequest) String

func (x *CreateTagRequest) String() string

func (*CreateTagRequest) Validate

func (req *CreateTagRequest) Validate() error

type DeleteTagRequest

type DeleteTagRequest struct {

	// Tag Value ID
	// @gotags: json:"tag_id" validate:"lte=200"
	TagId string `protobuf:"bytes,2,opt,name=tag_id,json=tagId,proto3" json:"tag_id" validate:"lte=200"`
	// contains filtered or unexported fields
}

DeleteTagRequest todo

func NewDeleteTagRequestWithID

func NewDeleteTagRequestWithID(id string) *DeleteTagRequest

NewDeleteTagRequestWithID todo

func (*DeleteTagRequest) Descriptor deprecated

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

Deprecated: Use DeleteTagRequest.ProtoReflect.Descriptor instead.

func (*DeleteTagRequest) GetTagId

func (x *DeleteTagRequest) GetTagId() string

func (*DeleteTagRequest) ProtoMessage

func (*DeleteTagRequest) ProtoMessage()

func (*DeleteTagRequest) ProtoReflect

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

func (*DeleteTagRequest) Reset

func (x *DeleteTagRequest) Reset()

func (*DeleteTagRequest) String

func (x *DeleteTagRequest) String() string

type DescribeTagRequest

type DescribeTagRequest struct {

	// Tag Value ID
	// @gotags: json:"tag_id" validate:"lte=200"
	TagId string `protobuf:"bytes,2,opt,name=tag_id,json=tagId,proto3" json:"tag_id" validate:"lte=200"`
	// contains filtered or unexported fields
}

func NewDescribeTagRequestWithID

func NewDescribeTagRequestWithID(id string) *DescribeTagRequest

NewDescribeTagRequestWithID todo

func (*DescribeTagRequest) Descriptor deprecated

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

Deprecated: Use DescribeTagRequest.ProtoReflect.Descriptor instead.

func (*DescribeTagRequest) GetTagId

func (x *DescribeTagRequest) GetTagId() string

func (*DescribeTagRequest) ProtoMessage

func (*DescribeTagRequest) ProtoMessage()

func (*DescribeTagRequest) ProtoReflect

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

func (*DescribeTagRequest) Reset

func (x *DescribeTagRequest) Reset()

func (*DescribeTagRequest) String

func (x *DescribeTagRequest) String() string

func (*DescribeTagRequest) Validate

func (req *DescribeTagRequest) Validate() error

type HTTPFromOption

type HTTPFromOption struct {

	// @gotags: bson:"url" json:"url"
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url" bson:"url"`
	// @gotags: bson:"headers" json:"headers"
	Headers map[string]string `` /* 160-byte string literal not displayed */
	// @gotags: bson:"search_key" json:"search_key"
	SearchKey string `protobuf:"bytes,3,opt,name=search_key,json=searchKey,proto3" json:"search_key" bson:"search_key"`
	// @gotags: bson:"value_key" json:"value_key"
	ValueKey string `protobuf:"bytes,4,opt,name=value_key,json=valueKey,proto3" json:"value_key" bson:"value_key"`
	// @gotags: bson:"label_key" json:"label_key"
	LabelKey string `protobuf:"bytes,5,opt,name=label_key,json=labelKey,proto3" json:"label_key" bson:"label_key"`
	// @gotags: bson:"desc_key" json:"desc_key"
	DescKey string `protobuf:"bytes,6,opt,name=desc_key,json=descKey,proto3" json:"desc_key" bson:"desc_key"`
	// contains filtered or unexported fields
}

HTTPFromOptions todo

func (*HTTPFromOption) Descriptor deprecated

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

Deprecated: Use HTTPFromOption.ProtoReflect.Descriptor instead.

func (*HTTPFromOption) GetDescKey

func (x *HTTPFromOption) GetDescKey() string

func (*HTTPFromOption) GetHeaders

func (x *HTTPFromOption) GetHeaders() map[string]string

func (*HTTPFromOption) GetLabelKey

func (x *HTTPFromOption) GetLabelKey() string

func (*HTTPFromOption) GetSearchKey

func (x *HTTPFromOption) GetSearchKey() string

func (*HTTPFromOption) GetUrl

func (x *HTTPFromOption) GetUrl() string

func (*HTTPFromOption) GetValueKey

func (x *HTTPFromOption) GetValueKey() string

func (*HTTPFromOption) ProtoMessage

func (*HTTPFromOption) ProtoMessage()

func (*HTTPFromOption) ProtoReflect

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

func (*HTTPFromOption) Reset

func (x *HTTPFromOption) Reset()

func (*HTTPFromOption) String

func (x *HTTPFromOption) String() string

type QueryTagKeyRequest

type QueryTagKeyRequest struct {

	// @gotags: json:"page"
	Page *request.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	// tag生效范围
	// @gotags: json:"scope_type"
	ScopeType ScopeType `protobuf:"varint,2,opt,name=scope_type,json=scopeType,proto3,enum=infraboard.keyauth.tag.ScopeType" json:"scope_type"`
	// 关键字
	// @gotags: json:"keywords"
	Keywords string `protobuf:"bytes,3,opt,name=keywords,proto3" json:"keywords"`
	// contains filtered or unexported fields
}

QueryTagKeyRequest todo

func NewQueryTagKeyRequest

func NewQueryTagKeyRequest(pageReq *request.PageRequest) *QueryTagKeyRequest

NewQueryRoleRequest 列表查询请求

func NewQueryTageKeyRequestFromHTTP

func NewQueryTageKeyRequestFromHTTP(r *http.Request) *QueryTagKeyRequest

NewQueryTageKeyRequestFromHTTP 列表查询请求

func (*QueryTagKeyRequest) Descriptor deprecated

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

Deprecated: Use QueryTagKeyRequest.ProtoReflect.Descriptor instead.

func (*QueryTagKeyRequest) GetKeywords

func (x *QueryTagKeyRequest) GetKeywords() string

func (*QueryTagKeyRequest) GetPage

func (x *QueryTagKeyRequest) GetPage() *request.PageRequest

func (*QueryTagKeyRequest) GetScopeType

func (x *QueryTagKeyRequest) GetScopeType() ScopeType

func (*QueryTagKeyRequest) ProtoMessage

func (*QueryTagKeyRequest) ProtoMessage()

func (*QueryTagKeyRequest) ProtoReflect

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

func (*QueryTagKeyRequest) Reset

func (x *QueryTagKeyRequest) Reset()

func (*QueryTagKeyRequest) String

func (x *QueryTagKeyRequest) String() string

func (*QueryTagKeyRequest) Validate

func (req *QueryTagKeyRequest) Validate() error

type QueryTagValueRequest

type QueryTagValueRequest struct {

	// @gotags: json:"page"
	Page *request.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	// Tag Value ID
	// @gotags: json:"tag_id"
	TagId string `protobuf:"bytes,2,opt,name=tag_id,json=tagId,proto3" json:"tag_id"`
	// contains filtered or unexported fields
}

QueryTagValueRequest todo

func NewQueryTagValueRequest

func NewQueryTagValueRequest(pageReq *request.PageRequest) *QueryTagValueRequest

NewQueryTagValueRequest 列表查询请求

func NewQueryTageValueRequestFromHTTP

func NewQueryTageValueRequestFromHTTP(r *http.Request) *QueryTagValueRequest

NewQueryTageValueRequestFromHTTP 列表查询请求

func (*QueryTagValueRequest) Descriptor deprecated

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

Deprecated: Use QueryTagValueRequest.ProtoReflect.Descriptor instead.

func (*QueryTagValueRequest) GetPage

func (*QueryTagValueRequest) GetTagId

func (x *QueryTagValueRequest) GetTagId() string

func (*QueryTagValueRequest) ProtoMessage

func (*QueryTagValueRequest) ProtoMessage()

func (*QueryTagValueRequest) ProtoReflect

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

func (*QueryTagValueRequest) Reset

func (x *QueryTagValueRequest) Reset()

func (*QueryTagValueRequest) String

func (x *QueryTagValueRequest) String() string

func (*QueryTagValueRequest) Validate

func (req *QueryTagValueRequest) Validate() error

type ScopeType

type ScopeType int32
const (
	// 范围现定在空间内
	ScopeType_NAMESPACE ScopeType = 0
	// 范围现定在域内
	ScopeType_DOMAIN ScopeType = 1
	// 全系统可用
	ScopeType_GLOBAL ScopeType = 2
)

func ParseScopeTypeFromString

func ParseScopeTypeFromString(str string) (ScopeType, error)

ParseScopeTypeFromString Parse ScopeType from string

func (ScopeType) Descriptor

func (ScopeType) Descriptor() protoreflect.EnumDescriptor

func (ScopeType) Enum

func (x ScopeType) Enum() *ScopeType

func (ScopeType) EnumDescriptor deprecated

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

Deprecated: Use ScopeType.Descriptor instead.

func (ScopeType) Equal

func (t ScopeType) Equal(target ScopeType) bool

Equal type compare

func (ScopeType) IsIn

func (t ScopeType) IsIn(targets ...ScopeType) bool

IsIn todo

func (ScopeType) MarshalJSON

func (t ScopeType) MarshalJSON() ([]byte, error)

MarshalJSON todo

func (ScopeType) Number

func (x ScopeType) Number() protoreflect.EnumNumber

func (ScopeType) String

func (x ScopeType) String() string

func (ScopeType) Type

func (*ScopeType) UnmarshalJSON

func (t *ScopeType) UnmarshalJSON(b []byte) error

UnmarshalJSON todo

type ServiceClient

type ServiceClient interface {
	CreateTag(ctx context.Context, in *CreateTagRequest, opts ...grpc.CallOption) (*TagKey, error)
	DescribeTag(ctx context.Context, in *DescribeTagRequest, opts ...grpc.CallOption) (*TagKey, error)
	DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*TagKey, error)
	QueryTagKey(ctx context.Context, in *QueryTagKeyRequest, opts ...grpc.CallOption) (*TagKeySet, error)
	QueryTagValue(ctx context.Context, in *QueryTagValueRequest, opts ...grpc.CallOption) (*TagValueSet, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	CreateTag(context.Context, *CreateTagRequest) (*TagKey, error)
	DescribeTag(context.Context, *DescribeTagRequest) (*TagKey, error)
	DeleteTag(context.Context, *DeleteTagRequest) (*TagKey, error)
	QueryTagKey(context.Context, *QueryTagKeyRequest) (*TagKeySet, error)
	QueryTagValue(context.Context, *QueryTagValueRequest) (*TagValueSet, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type TagKey

type TagKey struct {

	// Tag ID
	// @gotags: bson:"_id" json:"id"
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"`
	// 创建时间
	// @gotags: bson:"create_at" json:"create_at"
	CreateAt int64 `protobuf:"varint,2,opt,name=create_at,json=createAt,proto3" json:"create_at" bson:"create_at"`
	// 更新时间
	// @gotags: bson:"update_at" json:"update_at"
	UpdateAt int64 `protobuf:"varint,3,opt,name=update_at,json=updateAt,proto3" json:"update_at" bson:"update_at"`
	// Tag所属的域
	// @gotags: bson:"domain" json:"domain"
	Domain string `protobuf:"bytes,4,opt,name=domain,proto3" json:"domain" bson:"domain"`
	// 创建人
	// @gotags: bson:"creater" json:"creater"
	Creater string `protobuf:"bytes,5,opt,name=creater,proto3" json:"creater" bson:"creater"`
	// tag生效范围
	// @gotags: bson:"scope_type" json:"scope_type"
	ScopeType ScopeType `` /* 135-byte string literal not displayed */
	// tag属于哪个namespace
	// @gotags: bson:"namespace" json:"namespace"
	Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace" bson:"namespace"`
	// 建名称
	// @gotags: bson:"key_name" json:"key_name"
	KeyName string `protobuf:"bytes,8,opt,name=key_name,json=keyName,proto3" json:"key_name" bson:"key_name"`
	// 建标识
	// @gotags: bson:"key_label" json:"key_label"
	KeyLabel string `protobuf:"bytes,9,opt,name=key_label,json=keyLabel,proto3" json:"key_label" bson:"key_label"`
	// 建描述
	// @gotags: bson:"key_desc" json:"key_desc"
	KeyDesc string `protobuf:"bytes,10,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc" bson:"key_desc"`
	// 值来源
	// @gotags: bson:"value_from" json:"value_from"
	ValueFrom ValueFrom `` /* 136-byte string literal not displayed */
	// http 获取Tag 值的参数
	// @gotags: bson:"http_from_option" json:"http_from_option,omitempty"
	HttpFromOption *HTTPFromOption `` /* 130-byte string literal not displayed */
	// @gotags: bson:"-" json:"values,omitempty"
	Values []*TagValue `protobuf:"bytes,13,rep,name=values,proto3" json:"values,omitempty" bson:"-"`
	// contains filtered or unexported fields
}

Tag is 标签

func New

func New(req *CreateTagRequest) (*TagKey, error)

New 新创建一个Role

func NewDefaultTagKey

func NewDefaultTagKey() *TagKey

func (*TagKey) Descriptor deprecated

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

Deprecated: Use TagKey.ProtoReflect.Descriptor instead.

func (*TagKey) GetCreateAt

func (x *TagKey) GetCreateAt() int64

func (*TagKey) GetCreater

func (x *TagKey) GetCreater() string

func (*TagKey) GetDomain

func (x *TagKey) GetDomain() string

func (*TagKey) GetHttpFromOption

func (x *TagKey) GetHttpFromOption() *HTTPFromOption

func (*TagKey) GetId

func (x *TagKey) GetId() string

func (*TagKey) GetKeyDesc

func (x *TagKey) GetKeyDesc() string

func (*TagKey) GetKeyLabel

func (x *TagKey) GetKeyLabel() string

func (*TagKey) GetKeyName

func (x *TagKey) GetKeyName() string

func (*TagKey) GetNamespace

func (x *TagKey) GetNamespace() string

func (*TagKey) GetScopeType

func (x *TagKey) GetScopeType() ScopeType

func (*TagKey) GetUpdateAt

func (x *TagKey) GetUpdateAt() int64

func (*TagKey) GetValueFrom

func (x *TagKey) GetValueFrom() ValueFrom

func (*TagKey) GetValues

func (x *TagKey) GetValues() []*TagValue

func (*TagKey) ProtoMessage

func (*TagKey) ProtoMessage()

func (*TagKey) ProtoReflect

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

func (*TagKey) Reset

func (x *TagKey) Reset()

func (*TagKey) String

func (x *TagKey) String() string

type TagKeySet

type TagKeySet struct {

	// @gotags: bson:"total" json:"total"
	Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"`
	// @gotags: bson:"items" json:"items"
	Items []*TagKey `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"`
	// contains filtered or unexported fields
}

func NewTagKeySet

func NewTagKeySet() *TagKeySet

NewTagKeySet 实例化make

func (*TagKeySet) Add

func (s *TagKeySet) Add(item *TagKey)

Add todo

func (*TagKeySet) Descriptor deprecated

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

Deprecated: Use TagKeySet.ProtoReflect.Descriptor instead.

func (*TagKeySet) GetItems

func (x *TagKeySet) GetItems() []*TagKey

func (*TagKeySet) GetTotal

func (x *TagKeySet) GetTotal() int64

func (*TagKeySet) ProtoMessage

func (*TagKeySet) ProtoMessage()

func (*TagKeySet) ProtoReflect

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

func (*TagKeySet) Reset

func (x *TagKeySet) Reset()

func (*TagKeySet) String

func (x *TagKeySet) String() string

type TagValue

type TagValue struct {

	// Tag Value ID
	// @gotags: bson:"_id" json:"id"
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"`
	// 创建时间
	// @gotags: bson:"create_at" json:"create_at"
	CreateAt int64 `protobuf:"varint,2,opt,name=create_at,json=createAt,proto3" json:"create_at" bson:"create_at"`
	// 更新时间
	// @gotags: bson:"update_at" json:"update_at"
	UpdateAt int64 `protobuf:"varint,3,opt,name=update_at,json=updateAt,proto3" json:"update_at" bson:"update_at"`
	// 创建人
	// @gotags: bson:"creater" json:"creater"
	Creater string `protobuf:"bytes,4,opt,name=creater,proto3" json:"creater" bson:"creater"`
	// 关联的Tag key
	// @gotags: bson:"key_id" json:"key_id"
	KeyId string `protobuf:"bytes,5,opt,name=key_id,json=keyId,proto3" json:"key_id" bson:"key_id"`
	// String 类型的值
	// @gotags: bson:"value" json:"value"
	Value *ValueOption `protobuf:"bytes,6,opt,name=value,proto3" json:"value" bson:"value"`
	// contains filtered or unexported fields
}

func NewDefaultTagValue

func NewDefaultTagValue() *TagValue

func (*TagValue) Descriptor deprecated

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

Deprecated: Use TagValue.ProtoReflect.Descriptor instead.

func (*TagValue) GetCreateAt

func (x *TagValue) GetCreateAt() int64

func (*TagValue) GetCreater

func (x *TagValue) GetCreater() string

func (*TagValue) GetId

func (x *TagValue) GetId() string

func (*TagValue) GetKeyId

func (x *TagValue) GetKeyId() string

func (*TagValue) GetUpdateAt

func (x *TagValue) GetUpdateAt() int64

func (*TagValue) GetValue

func (x *TagValue) GetValue() *ValueOption

func (*TagValue) ProtoMessage

func (*TagValue) ProtoMessage()

func (*TagValue) ProtoReflect

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

func (*TagValue) Reset

func (x *TagValue) Reset()

func (*TagValue) String

func (x *TagValue) String() string

type TagValueSet

type TagValueSet struct {

	// @gotags: bson:"total" json:"total"
	Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"`
	// @gotags: bson:"items" json:"items"
	Items []*TagValue `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"`
	// contains filtered or unexported fields
}

func NewTagValueSet

func NewTagValueSet() *TagValueSet

NewTagValueSet 实例化make

func (*TagValueSet) Add

func (s *TagValueSet) Add(item *TagValue)

Add todo

func (*TagValueSet) Descriptor deprecated

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

Deprecated: Use TagValueSet.ProtoReflect.Descriptor instead.

func (*TagValueSet) GetItems

func (x *TagValueSet) GetItems() []*TagValue

func (*TagValueSet) GetTotal

func (x *TagValueSet) GetTotal() int64

func (*TagValueSet) ProtoMessage

func (*TagValueSet) ProtoMessage()

func (*TagValueSet) ProtoReflect

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

func (*TagValueSet) Reset

func (x *TagValueSet) Reset()

func (*TagValueSet) String

func (x *TagValueSet) String() string

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) CreateTag

func (UnimplementedServiceServer) DeleteTag

func (UnimplementedServiceServer) DescribeTag

func (UnimplementedServiceServer) QueryTagKey

func (UnimplementedServiceServer) QueryTagValue

type UnsafeServiceServer

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

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

type ValueFrom

type ValueFrom int32

ValueFrom 值来源

const (
	// 手动录入
	ValueFrom_MANUAL ValueFrom = 0
	// 远程HTTP调用
	ValueFrom_HTTP ValueFrom = 1
)

func ParseValueFromFromString

func ParseValueFromFromString(str string) (ValueFrom, error)

ParseValueFromFromString Parse ValueFrom from string

func (ValueFrom) Descriptor

func (ValueFrom) Descriptor() protoreflect.EnumDescriptor

func (ValueFrom) Enum

func (x ValueFrom) Enum() *ValueFrom

func (ValueFrom) EnumDescriptor deprecated

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

Deprecated: Use ValueFrom.Descriptor instead.

func (ValueFrom) Equal

func (t ValueFrom) Equal(target ValueFrom) bool

Equal type compare

func (ValueFrom) IsIn

func (t ValueFrom) IsIn(targets ...ValueFrom) bool

IsIn todo

func (ValueFrom) MarshalJSON

func (t ValueFrom) MarshalJSON() ([]byte, error)

MarshalJSON todo

func (ValueFrom) Number

func (x ValueFrom) Number() protoreflect.EnumNumber

func (ValueFrom) String

func (x ValueFrom) String() string

func (ValueFrom) Type

func (*ValueFrom) UnmarshalJSON

func (t *ValueFrom) UnmarshalJSON(b []byte) error

UnmarshalJSON todo

type ValueOption

type ValueOption struct {

	// @gotags: bson:"value" json:"value" validate:"lte=200"
	Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"value" bson:"value" validate:"lte=200"`
	// @gotags: bson:"label" json:"label"
	Label string `protobuf:"bytes,2,opt,name=Label,proto3" json:"label" bson:"label"`
	// @gotags: bson:"desc" json:"desc"
	Desc string `protobuf:"bytes,3,opt,name=Desc,proto3" json:"desc" bson:"desc"`
	// contains filtered or unexported fields
}

ValueOptions 值描述

func (*ValueOption) Descriptor deprecated

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

Deprecated: Use ValueOption.ProtoReflect.Descriptor instead.

func (*ValueOption) GetDesc

func (x *ValueOption) GetDesc() string

func (*ValueOption) GetLabel

func (x *ValueOption) GetLabel() string

func (*ValueOption) GetValue

func (x *ValueOption) GetValue() string

func (*ValueOption) ProtoMessage

func (*ValueOption) ProtoMessage()

func (*ValueOption) ProtoReflect

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

func (*ValueOption) Reset

func (x *ValueOption) Reset()

func (*ValueOption) String

func (x *ValueOption) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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