syncing_meta

package
v0.4.20 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncingMeta

type SyncingMeta struct {

	// For regional resources (or their descendants) it is equal to the region ID (present in resource name). Otherwise
	// it is equal to the region as defined in Policy object under default_control_region field.
	OwningRegion string `protobuf:"bytes,1,opt,name=owning_region,json=owningRegion,proto3" json:"owning_region,omitempty" firestore:"owningRegion"`
	// List of regions where owning resource can be present. If can be present in all regions, will contain "*".
	Regions []string `protobuf:"bytes,2,rep,name=regions,proto3" json:"regions,omitempty" firestore:"regions"`
	// contains filtered or unexported fields
}

SyncingMeta is a helper object associated with each resource that is either regional or is governed by Policy object. Developer of a service must place instance of this object inside resource schema for each resource, otherwise service will not compile. This object is used for internal purposes like Sync controller which ensures data synchronization of all resources across multiple regions. This object must be defined in each resource schema, but not necessarily as "top" field. It can be in the nested message. Code-gen tools automatically tries to detect presence of this field in resource schema - by using first field path found. It puts priority on the shortest path from the root - breadth first.

func (*SyncingMeta) Clone

func (o *SyncingMeta) Clone() *SyncingMeta

func (*SyncingMeta) CloneRaw

func (o *SyncingMeta) CloneRaw() gotenobject.GotenObjectExt

func (*SyncingMeta) Descriptor

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

Deprecated, Use SyncingMeta.ProtoReflect.Descriptor instead.

func (*SyncingMeta) GetOwningRegion

func (m *SyncingMeta) GetOwningRegion() string

func (*SyncingMeta) GetRegions

func (m *SyncingMeta) GetRegions() []string

func (*SyncingMeta) GotenMessage

func (*SyncingMeta) GotenMessage()

func (*SyncingMeta) GotenObjectExt

func (o *SyncingMeta) GotenObjectExt()

func (*SyncingMeta) GotenValidate

func (obj *SyncingMeta) GotenValidate() error

func (*SyncingMeta) MakeDiffFieldMask

func (o *SyncingMeta) MakeDiffFieldMask(other *SyncingMeta) *SyncingMeta_FieldMask

func (*SyncingMeta) MakeFullFieldMask

func (o *SyncingMeta) MakeFullFieldMask() *SyncingMeta_FieldMask

func (*SyncingMeta) MakeRawDiffFieldMask

func (o *SyncingMeta) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask

func (*SyncingMeta) MakeRawFullFieldMask

func (o *SyncingMeta) MakeRawFullFieldMask() gotenobject.FieldMask

func (*SyncingMeta) Marshal

func (m *SyncingMeta) Marshal() ([]byte, error)

func (*SyncingMeta) MarshalJSON

func (m *SyncingMeta) MarshalJSON() ([]byte, error)

func (*SyncingMeta) Merge

func (o *SyncingMeta) Merge(source *SyncingMeta)

func (*SyncingMeta) MergeRaw

func (o *SyncingMeta) MergeRaw(source gotenobject.GotenObjectExt)

func (*SyncingMeta) ProtoMessage

func (*SyncingMeta) ProtoMessage()

func (*SyncingMeta) ProtoReflect

func (m *SyncingMeta) ProtoReflect() preflect.Message

func (*SyncingMeta) Reset

func (m *SyncingMeta) Reset()

func (*SyncingMeta) SetOwningRegion

func (m *SyncingMeta) SetOwningRegion(fv string)

func (*SyncingMeta) SetRegions

func (m *SyncingMeta) SetRegions(fv []string)

func (*SyncingMeta) String

func (m *SyncingMeta) String() string

func (*SyncingMeta) Unmarshal

func (m *SyncingMeta) Unmarshal(b []byte) error

func (*SyncingMeta) UnmarshalJSON

func (m *SyncingMeta) UnmarshalJSON(data []byte) error

type SyncingMetaFieldPathBuilder

type SyncingMetaFieldPathBuilder struct{}

func NewSyncingMetaFieldPathBuilder

func NewSyncingMetaFieldPathBuilder() SyncingMetaFieldPathBuilder

func (SyncingMetaFieldPathBuilder) OwningRegion

func (SyncingMetaFieldPathBuilder) Regions

type SyncingMetaPathSelectorOwningRegion

type SyncingMetaPathSelectorOwningRegion struct{}

func (SyncingMetaPathSelectorOwningRegion) FieldPath

func (SyncingMetaPathSelectorOwningRegion) WithArrayOfValues

func (SyncingMetaPathSelectorOwningRegion) WithValue

type SyncingMetaPathSelectorRegions

type SyncingMetaPathSelectorRegions struct{}

func (SyncingMetaPathSelectorRegions) FieldPath

func (SyncingMetaPathSelectorRegions) WithArrayOfValues

func (SyncingMetaPathSelectorRegions) WithItemValue

func (SyncingMetaPathSelectorRegions) WithValue

type SyncingMeta_FieldMask

type SyncingMeta_FieldMask struct {
	Paths []SyncingMeta_FieldPath
}

func FullSyncingMeta_FieldMask

func FullSyncingMeta_FieldMask() *SyncingMeta_FieldMask

func (*SyncingMeta_FieldMask) AppendPath

func (fieldMask *SyncingMeta_FieldMask) AppendPath(path SyncingMeta_FieldPath)

func (*SyncingMeta_FieldMask) AppendRawPath

func (fieldMask *SyncingMeta_FieldMask) AppendRawPath(path gotenobject.FieldPath)

func (*SyncingMeta_FieldMask) DecodeFirestore

func (fieldMask *SyncingMeta_FieldMask) DecodeFirestore(fpbv *firestorepb.Value) error

func (*SyncingMeta_FieldMask) EncodeFirestore

func (fieldMask *SyncingMeta_FieldMask) EncodeFirestore() (*firestorepb.Value, error)

firestore encoding/decoding integration

func (*SyncingMeta_FieldMask) FilterInputFields

func (fieldMask *SyncingMeta_FieldMask) FilterInputFields() *SyncingMeta_FieldMask

FilterInputFields generates copy of field paths with output_only field paths removed

func (*SyncingMeta_FieldMask) FromProtoFieldMask

func (fieldMask *SyncingMeta_FieldMask) FromProtoFieldMask(protoFieldMask *fieldmaskpb.FieldMask) error

func (*SyncingMeta_FieldMask) GetPaths

func (fieldMask *SyncingMeta_FieldMask) GetPaths() []SyncingMeta_FieldPath

func (*SyncingMeta_FieldMask) GetRawPaths

func (fieldMask *SyncingMeta_FieldMask) GetRawPaths() []gotenobject.FieldPath

func (*SyncingMeta_FieldMask) IsFull

func (fieldMask *SyncingMeta_FieldMask) IsFull() bool

func (SyncingMeta_FieldMask) Marshal

func (fieldMask SyncingMeta_FieldMask) Marshal() ([]byte, error)

implement methods required by customType

func (SyncingMeta_FieldMask) MarshalJSON

func (fieldMask SyncingMeta_FieldMask) MarshalJSON() ([]byte, error)

func (*SyncingMeta_FieldMask) PathsCount

func (fieldMask *SyncingMeta_FieldMask) PathsCount() int

func (*SyncingMeta_FieldMask) Project

func (fieldMask *SyncingMeta_FieldMask) Project(source *SyncingMeta) *SyncingMeta

func (*SyncingMeta_FieldMask) ProjectRaw

func (*SyncingMeta_FieldMask) ProtoMessage

func (fieldMask *SyncingMeta_FieldMask) ProtoMessage()

func (*SyncingMeta_FieldMask) ProtoReflect

func (fieldMask *SyncingMeta_FieldMask) ProtoReflect() preflect.Message

func (*SyncingMeta_FieldMask) Reset

func (fieldMask *SyncingMeta_FieldMask) Reset()

func (*SyncingMeta_FieldMask) Set

func (fieldMask *SyncingMeta_FieldMask) Set(target, source *SyncingMeta)

func (*SyncingMeta_FieldMask) SetFromCliFlag

func (fieldMask *SyncingMeta_FieldMask) SetFromCliFlag(raw string) error

func (*SyncingMeta_FieldMask) SetRaw

func (fieldMask *SyncingMeta_FieldMask) SetRaw(target, source gotenobject.GotenObjectExt)

func (*SyncingMeta_FieldMask) Size

func (fieldMask *SyncingMeta_FieldMask) Size() int

func (*SyncingMeta_FieldMask) String

func (fieldMask *SyncingMeta_FieldMask) String() string

func (*SyncingMeta_FieldMask) Subtract

func (*SyncingMeta_FieldMask) SubtractRaw

func (fieldMask *SyncingMeta_FieldMask) SubtractRaw(other gotenobject.FieldMask) gotenobject.FieldMask

func (*SyncingMeta_FieldMask) ToProtoFieldMask

func (fieldMask *SyncingMeta_FieldMask) ToProtoFieldMask() *fieldmaskpb.FieldMask

ToFieldMask is used for proto conversions

func (*SyncingMeta_FieldMask) Unmarshal

func (fieldMask *SyncingMeta_FieldMask) Unmarshal(data []byte) error

func (*SyncingMeta_FieldMask) UnmarshalJSON

func (fieldMask *SyncingMeta_FieldMask) UnmarshalJSON(data []byte) error

type SyncingMeta_FieldPath

type SyncingMeta_FieldPath interface {
	gotenobject.FieldPath
	Selector() SyncingMeta_FieldPathSelector
	Get(source *SyncingMeta) []interface{}
	GetSingle(source *SyncingMeta) (interface{}, bool)
	ClearValue(item *SyncingMeta)

	// Those methods build corresponding SyncingMeta_FieldPathValue
	// (or array of values) and holds passed value. Panics if injected type is incorrect.
	WithIValue(value interface{}) SyncingMeta_FieldPathValue
	WithIArrayOfValues(values interface{}) SyncingMeta_FieldPathArrayOfValues
	WithIArrayItemValue(value interface{}) SyncingMeta_FieldPathArrayItemValue
}

FieldPath provides implementation to handle https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto

func MustParseSyncingMeta_FieldPath

func MustParseSyncingMeta_FieldPath(rawField string) SyncingMeta_FieldPath

func ParseSyncingMeta_FieldPath

func ParseSyncingMeta_FieldPath(rawField string) (SyncingMeta_FieldPath, error)

type SyncingMeta_FieldPathArrayItemValue

type SyncingMeta_FieldPathArrayItemValue interface {
	gotenobject.FieldPathArrayItemValue
	SyncingMeta_FieldPath
	ContainsValue(*SyncingMeta) bool
}

SyncingMeta_FieldPathArrayItemValue allows storing single item in Path-specific values for SyncingMeta according to their type Present only for array (repeated) types.

func MustParseSyncingMeta_FieldPathArrayItemValue

func MustParseSyncingMeta_FieldPathArrayItemValue(pathStr, valueStr string) SyncingMeta_FieldPathArrayItemValue

func ParseSyncingMeta_FieldPathArrayItemValue

func ParseSyncingMeta_FieldPathArrayItemValue(pathStr, valueStr string) (SyncingMeta_FieldPathArrayItemValue, error)

ParseSyncingMeta_FieldPathArrayItemValue parses string and JSON-encoded value to its Value

type SyncingMeta_FieldPathArrayOfValues

type SyncingMeta_FieldPathArrayOfValues interface {
	gotenobject.FieldPathArrayOfValues
	SyncingMeta_FieldPath
}

SyncingMeta_FieldPathArrayOfValues allows storing slice of values for SyncingMeta fields according to their type

func MustParseSyncingMeta_FieldPathArrayOfValues

func MustParseSyncingMeta_FieldPathArrayOfValues(pathStr, valuesStr string) SyncingMeta_FieldPathArrayOfValues

func ParseSyncingMeta_FieldPathArrayOfValues

func ParseSyncingMeta_FieldPathArrayOfValues(pathStr, valuesStr string) (SyncingMeta_FieldPathArrayOfValues, error)

type SyncingMeta_FieldPathSelector

type SyncingMeta_FieldPathSelector int32
const (
	SyncingMeta_FieldPathSelectorOwningRegion SyncingMeta_FieldPathSelector = 0
	SyncingMeta_FieldPathSelectorRegions      SyncingMeta_FieldPathSelector = 1
)

func (SyncingMeta_FieldPathSelector) String

type SyncingMeta_FieldPathValue

type SyncingMeta_FieldPathValue interface {
	SyncingMeta_FieldPath
	gotenobject.FieldPathValue
	SetTo(target **SyncingMeta)
	CompareWith(*SyncingMeta) (cmp int, comparable bool)
}

SyncingMeta_FieldPathValue allows storing values for SyncingMeta fields according to their type

func MustParseSyncingMeta_FieldPathValue

func MustParseSyncingMeta_FieldPathValue(pathStr, valueStr string) SyncingMeta_FieldPathValue

func ParseSyncingMeta_FieldPathValue

func ParseSyncingMeta_FieldPathValue(pathStr, valueStr string) (SyncingMeta_FieldPathValue, error)

type SyncingMeta_FieldTerminalPath

type SyncingMeta_FieldTerminalPath struct {
	// contains filtered or unexported fields
}

func (*SyncingMeta_FieldTerminalPath) ClearValue

func (fp *SyncingMeta_FieldTerminalPath) ClearValue(item *SyncingMeta)

func (*SyncingMeta_FieldTerminalPath) ClearValueRaw

func (fp *SyncingMeta_FieldTerminalPath) ClearValueRaw(item proto.Message)

func (*SyncingMeta_FieldTerminalPath) Get

func (fp *SyncingMeta_FieldTerminalPath) Get(source *SyncingMeta) (values []interface{})

Get returns all values pointed by specific field from source SyncingMeta

func (*SyncingMeta_FieldTerminalPath) GetDefault

func (fp *SyncingMeta_FieldTerminalPath) GetDefault() interface{}

GetDefault returns a default value of the field type

func (*SyncingMeta_FieldTerminalPath) GetRaw

func (fp *SyncingMeta_FieldTerminalPath) GetRaw(source proto.Message) []interface{}

func (*SyncingMeta_FieldTerminalPath) GetSingle

func (fp *SyncingMeta_FieldTerminalPath) GetSingle(source *SyncingMeta) (interface{}, bool)

GetSingle returns value pointed by specific field of from source SyncingMeta

func (*SyncingMeta_FieldTerminalPath) GetSingleRaw

func (fp *SyncingMeta_FieldTerminalPath) GetSingleRaw(source proto.Message) (interface{}, bool)

func (*SyncingMeta_FieldTerminalPath) IsLeaf

func (fp *SyncingMeta_FieldTerminalPath) IsLeaf() bool

IsLeaf - whether field path is holds simple value

func (*SyncingMeta_FieldTerminalPath) JSONString

func (fp *SyncingMeta_FieldTerminalPath) JSONString() string

JSONString returns path representation is JSON convention

func (*SyncingMeta_FieldTerminalPath) Selector

func (*SyncingMeta_FieldTerminalPath) String

String returns path representation in proto convention

func (*SyncingMeta_FieldTerminalPath) WithIArrayItemValue

func (fp *SyncingMeta_FieldTerminalPath) WithIArrayItemValue(value interface{}) SyncingMeta_FieldPathArrayItemValue

func (*SyncingMeta_FieldTerminalPath) WithIArrayOfValues

func (fp *SyncingMeta_FieldTerminalPath) WithIArrayOfValues(values interface{}) SyncingMeta_FieldPathArrayOfValues

func (*SyncingMeta_FieldTerminalPath) WithIValue

func (fp *SyncingMeta_FieldTerminalPath) WithIValue(value interface{}) SyncingMeta_FieldPathValue

func (*SyncingMeta_FieldTerminalPath) WithRawIArrayItemValue

func (fp *SyncingMeta_FieldTerminalPath) WithRawIArrayItemValue(value interface{}) gotenobject.FieldPathArrayItemValue

func (*SyncingMeta_FieldTerminalPath) WithRawIArrayOfValues

func (fp *SyncingMeta_FieldTerminalPath) WithRawIArrayOfValues(values interface{}) gotenobject.FieldPathArrayOfValues

func (*SyncingMeta_FieldTerminalPath) WithRawIValue

func (fp *SyncingMeta_FieldTerminalPath) WithRawIValue(value interface{}) gotenobject.FieldPathValue

type SyncingMeta_FieldTerminalPathArrayItemValue

type SyncingMeta_FieldTerminalPathArrayItemValue struct {
	SyncingMeta_FieldTerminalPath
	// contains filtered or unexported fields
}

func (*SyncingMeta_FieldTerminalPathArrayItemValue) AsRegionsItemValue

func (fpaiv *SyncingMeta_FieldTerminalPathArrayItemValue) AsRegionsItemValue() (string, bool)

func (*SyncingMeta_FieldTerminalPathArrayItemValue) ContainsValue

func (fpaiv *SyncingMeta_FieldTerminalPathArrayItemValue) ContainsValue(source *SyncingMeta) bool

Contains returns a boolean indicating if value that is being held is present in given 'SyncingMeta'

func (*SyncingMeta_FieldTerminalPathArrayItemValue) GetRawItemValue

func (fpaiv *SyncingMeta_FieldTerminalPathArrayItemValue) GetRawItemValue() interface{}

GetRawValue returns stored element value for array in object SyncingMeta as interface{}

func (*SyncingMeta_FieldTerminalPathArrayItemValue) GetSingle

func (fpaiv *SyncingMeta_FieldTerminalPathArrayItemValue) GetSingle(source *SyncingMeta) (interface{}, bool)

func (*SyncingMeta_FieldTerminalPathArrayItemValue) GetSingleRaw

func (fpaiv *SyncingMeta_FieldTerminalPathArrayItemValue) GetSingleRaw(source proto.Message) (interface{}, bool)

type SyncingMeta_FieldTerminalPathArrayOfValues

type SyncingMeta_FieldTerminalPathArrayOfValues struct {
	SyncingMeta_FieldTerminalPath
	// contains filtered or unexported fields
}

func (*SyncingMeta_FieldTerminalPathArrayOfValues) AsOwningRegionArrayOfValues

func (fpaov *SyncingMeta_FieldTerminalPathArrayOfValues) AsOwningRegionArrayOfValues() ([]string, bool)

func (*SyncingMeta_FieldTerminalPathArrayOfValues) AsRegionsArrayOfValues

func (fpaov *SyncingMeta_FieldTerminalPathArrayOfValues) AsRegionsArrayOfValues() ([][]string, bool)

func (*SyncingMeta_FieldTerminalPathArrayOfValues) GetRawValues

func (fpaov *SyncingMeta_FieldTerminalPathArrayOfValues) GetRawValues() (values []interface{})

type SyncingMeta_FieldTerminalPathValue

type SyncingMeta_FieldTerminalPathValue struct {
	SyncingMeta_FieldTerminalPath
	// contains filtered or unexported fields
}

func (*SyncingMeta_FieldTerminalPathValue) AsOwningRegionValue

func (fpv *SyncingMeta_FieldTerminalPathValue) AsOwningRegionValue() (string, bool)

func (*SyncingMeta_FieldTerminalPathValue) AsRegionsValue

func (fpv *SyncingMeta_FieldTerminalPathValue) AsRegionsValue() ([]string, bool)

func (*SyncingMeta_FieldTerminalPathValue) CompareWith

func (fpv *SyncingMeta_FieldTerminalPathValue) CompareWith(source *SyncingMeta) (int, bool)

CompareWith compares value in the 'SyncingMeta_FieldTerminalPathValue' with the value under path in 'SyncingMeta'.

func (*SyncingMeta_FieldTerminalPathValue) CompareWithRaw

func (fpv *SyncingMeta_FieldTerminalPathValue) CompareWithRaw(source proto.Message) (int, bool)

func (*SyncingMeta_FieldTerminalPathValue) GetRawValue

func (fpv *SyncingMeta_FieldTerminalPathValue) GetRawValue() interface{}

GetRawValue returns raw value stored under selected path for 'SyncingMeta' as interface{}

func (*SyncingMeta_FieldTerminalPathValue) SetTo

func (fpv *SyncingMeta_FieldTerminalPathValue) SetTo(target **SyncingMeta)

SetTo stores value for selected field for object SyncingMeta

func (*SyncingMeta_FieldTerminalPathValue) SetToRaw

func (fpv *SyncingMeta_FieldTerminalPathValue) SetToRaw(target proto.Message)

Jump to

Keyboard shortcuts

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