pb

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Meta_name = map[int32]string{
		0:  "Unknown",
		1:  "Image",
		2:  "Video",
		3:  "Audio",
		4:  "Archive",
		5:  "Documents",
		6:  "Font",
		7:  "Application",
		8:  "Java",
		9:  "Golang",
		10: "JavaScript",
	}
	Meta_value = map[string]int32{
		"Unknown":     0,
		"Image":       1,
		"Video":       2,
		"Audio":       3,
		"Archive":     4,
		"Documents":   5,
		"Font":        6,
		"Application": 7,
		"Java":        8,
		"Golang":      9,
		"JavaScript":  10,
	}
)

Enum value maps for Meta.

View Source
var File_pb_config_proto protoreflect.FileDescriptor
View Source
var File_pb_group_proto protoreflect.FileDescriptor
View Source
var File_pb_meta_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {
	Group  []*Group `protobuf:"bytes,1,rep,name=group,proto3" json:"group,omitempty"`
	Ignore []string `protobuf:"bytes,2,rep,name=ignore,proto3" json:"ignore,omitempty"`
	// contains filtered or unexported fields
}

Config 配置信息.

func NewConfig

func NewConfig(cmd *cobra.Command) *Config

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetGroup

func (x *Config) GetGroup() []*Group

func (*Config) GetIgnore

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

func (*Config) IsIgnore

func (p *Config) IsIgnore(path string) bool

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

type Group

type Group struct {
	Watch string            `protobuf:"bytes,1,opt,name=watch,proto3" json:"watch,omitempty"`
	Meta  map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Group 分组.

func (*Group) Descriptor deprecated

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

Deprecated: Use Group.ProtoReflect.Descriptor instead.

func (*Group) GetMeta

func (x *Group) GetMeta() map[string]string

func (*Group) GetWatch

func (x *Group) GetWatch() string

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) ProtoReflect

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

func (*Group) Reset

func (x *Group) Reset()

func (*Group) String

func (x *Group) String() string

type Meta

type Meta int32

Meta 模型.

const (
	Meta_Unknown     Meta = 0
	Meta_Image       Meta = 1
	Meta_Video       Meta = 2
	Meta_Audio       Meta = 3
	Meta_Archive     Meta = 4
	Meta_Documents   Meta = 5
	Meta_Font        Meta = 6
	Meta_Application Meta = 7
	Meta_Java        Meta = 8
	Meta_Golang      Meta = 9
	Meta_JavaScript  Meta = 10
)

func GetMeta

func GetMeta(path string) (Meta, error)

func GetMetaByExt

func GetMetaByExt(path string) Meta

func GetMetaByReader

func GetMetaByReader(readCloser io.ReadCloser) (Meta, error)

func (Meta) Descriptor

func (Meta) Descriptor() protoreflect.EnumDescriptor

func (Meta) Enum

func (x Meta) Enum() *Meta

func (Meta) EnumDescriptor deprecated

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

Deprecated: Use Meta.Descriptor instead.

func (Meta) Number

func (x Meta) Number() protoreflect.EnumNumber

func (Meta) String

func (x Meta) String() string

func (Meta) Type

func (Meta) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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