prop

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckInRange added in v0.10.6

func CheckInRange(prop *tableaupb.FieldProp, fd protoreflect.FieldDescriptor, value protoreflect.Value, present bool) error

func CheckMapKeySequence added in v0.9.17

func CheckMapKeySequence(prop *tableaupb.FieldProp, kind protoreflect.Kind, mapkey protoreflect.MapKey, prefMap protoreflect.Map) bool

func CheckPresence added in v0.11.0

func CheckPresence(prop *tableaupb.FieldProp, present bool) error

func GetSize added in v0.10.6

func GetSize(prop *tableaupb.FieldProp, detectedSize int) int

GetSize returns the specified size of horizontal list/map. detectedSize is the scanned size of name row.

func HasUnique added in v0.11.0

func HasUnique(prop *tableaupb.FieldProp) bool

HasUnique checks whether the unique field is set explicitly.

func InReferredSpace added in v0.10.6

func InReferredSpace(prop *tableaupb.FieldProp, cellData string, input *Input) (bool, error)

InReferredSpace checks whether the cell data is at least in one of the other sheets' column value space (aka message's field value space). prop.Refer is comma separated, e.g.: "SheetName(SheetAlias).ColumnName[,SheetName(SheetAlias).ColumnName]..."

func IsFixed added in v0.10.2

func IsFixed(prop *tableaupb.FieldProp) bool

IsFixed check the horizontal list/map is fixed size or not.

func RequireUnique added in v0.11.0

func RequireUnique(prop *tableaupb.FieldProp) bool

Types

type Input added in v0.10.6

type Input struct {
	ProtoPackage   string
	InputDir       string
	SubdirRewrites map[string]string
	PRFiles        *protoregistry.Files
	Present        bool // field presence
}

type ReferDesc added in v0.11.0

type ReferDesc struct {
	Sheet  string // sheet name in workbook.
	Alias  string // sheet alias: if set, used as protobuf message name.
	Column string // sheet column name in name row.
}

func (*ReferDesc) GetMessageName added in v0.11.0

func (r *ReferDesc) GetMessageName() string

type ReferredCache added in v0.10.6

type ReferredCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewReferredCache added in v0.10.6

func NewReferredCache() *ReferredCache

func (*ReferredCache) Exists added in v0.10.6

func (r *ReferredCache) Exists(refer string) bool

func (*ReferredCache) ExistsValue added in v0.10.6

func (r *ReferredCache) ExistsValue(refer string, value string, loadFunc loadValueSpaceFunc) (bool, error)

func (*ReferredCache) Put added in v0.10.6

func (r *ReferredCache) Put(refer string, valueSpace *ValueSpace)

type ValueSpace added in v0.10.6

type ValueSpace struct {
	*hashset.Set
}

func NewValueSpace added in v0.10.6

func NewValueSpace() *ValueSpace

Jump to

Keyboard shortcuts

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