All messages and enums in package goten.types

Proto package goten.types

goten.types Shared Messages

Here is the list of goten.types shared messages:

Memo Message

Memo

Name Type Description
create_time .google.protobuf.Timestamp
update_time .google.protobuf.Timestamp
message string
created_by string

Meta Message

Metadata

Name Type Description
create_time .google.protobuf.Timestamp
update_time .google.protobuf.Timestamp
delete_time .google.protobuf.Timestamp
uuid string
tags repeated string
labels map<string, string>
annotations map<string, string>
generation int64 generation is the version number of the spec of the resource. This number increments when the resource is updated with any changes of its spec.
resource_version string An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
owner_references repeated OwnerReference List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected, unless, the last owner reference had the unset_on_delete flag set to true - in this case the object won’t be garbage collected, just the owner reference will be unset. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true.
shards map<string, int64> List of all shard indices by their keys
syncing SyncingMeta Information about resource region and synchronization
lifecycle Lifecycle Current lifecycle information about resource.
services ServicesInfo Information about services access.ownership of given resource. Non populated value should be treated as unregulated access.

LabelSelector Message

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

Name Type Description
match_labels map<string, string> matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
match_expressions repeated LabelSelectorRequirement matchExpressions is a list of label selector requirements. The requirements are ANDed.

LabelSelectorRequirement Message

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Name Type Description
key string key is the label key that the selector applies to. +patchMergeKey=key +patchStrategy=merge
operator string operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
values repeated string values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. +optional

OwnerReference Message

OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.

Name Type Description
kind string Resource kind, for example “library.goten.com/Site”
version string For example v1
name string Name of the resource, for example projects/p1/devices/d1
region string Region ID owning resource
controller bool If true, this reference points to the managing controller.
requires_owner_reference bool This flag indicates that owner must have schema-based reference for this owner reference to be valid. Otherwise it will be removed. If there are no other owners, resource will be deleted. It also works if owner resource unsets its reference. This extends default behavior of meta references, where ownees are deleted only when owner is deleted. Here, we also want to delete ownee if owner just stops pointing to ownee via own reference (or never pointed at all). This flag is useful if higher-level service creates some resource in lower level service and assigns via schema reference.
unset_on_delete bool This flag indicates if the reference should be unset on the owner deletion. If set, owner’s deletion will not cause the resource deletion, but rather only the owner reference will be unset

SyncingMeta Message

SyncingMeta is a helper object associated with each resource that is either regional or is governed by Policy object. This object is used for internal purposes like Sync controller which ensures data synchronization of all resources across multiple regions.

Name Type Description
owning_region string 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.
regions repeated string List of regions where owning resource can be present. If can be present in all regions, will contain “*”.

Lifecycle Message

Name Type Description
state Lifecycle.State Current resource state
block_deletion bool Optional flag indicating that resource must not be deleted - at least yet. This flag is not accessible via API, it is expected developer will populate it if needed from custom server code. It should be used when some condition (other than blocking back reference) applies that server is not aware of. If flag is true, then constraint store will block resource deletion. GC will also defer from cleaning up, however developer should ensure that eventually deletion will be done.

ServicesInfo Message

ServicesInfo contains information about resource ownership/access in terms of service. As goten is a multi-service framework, it is possible for a resource in one service to be “owned” by another one. Owning service may also need to regulate access to other services via allowed services field. It should be note that Goten does not provide authorization layer of its own, ServicesInfo is provided for convenience, but actual restriction should be implemented by actual services.

Name Type Description
owning_service string Service domain owning resource
allowed_services repeated string List of services with allowed access to resource.

MultiRegionPolicy Message

MultiRegionPolicy is an object defining relation between service in multi-region environment and resource holding this policy (as one of its fields). Policy ought to be used for high-level resources like “Project” or “Organization” which form top elements in scopes. Policy then, attached to such a high level resource defines syncing policies for all kid resources and limits their geographical belonging (kid resources can belong only to the region allowed by a policy). Note: While policy governs all resources under policy holder resource, policy holder resource itself is not subject to this policy. This rule allows information about policy spread properly across regions and enables routing.

Name Type Description
enabled_regions repeated string List of regions available in the scope. It is forbidden to create resource within given scope outside allowed regions.
default_control_region string Must be within restricted_regions. Defines region handling CUD requests for resources not attached to any region.
criteria_for_disabled_sync repeated MultiRegionPolicy.CriteriaForDisabledSync List of criteria according to which synchronization is disabled.

MultiRegionPolicy.CriteriaForDisabledSync Message

CriteriaForDisabledSync is a rule preventing data synchronization. By default, everything within Policy scope is synced (unless schema tells otherwise). However, within single scope to which this policy is attached, it is possible to blacklist synchronization for specific criteria. Examples: { resource_type_name: “devices.service.com/Device”, sourceRegion: “france” } -> will make Devices in France private { resource_type_name: “devices.service.com/Device”, destRegion: “hongkong” } -> will prevent from syncing Devices INTO HongKong region { resource_type_name: “devices.service.com/Device”, sourceRegion: “germany”, destRegion: “hongkong” } -> Will block syncing of Devices from Germany to HongKong. { resource_type_name: “devices.service.com/Pod” } -> will make Pods in all regions private { region: “japan” } -> will make all resources in Japan private

Name Type Description
resource_type_name string Fully qualified name of a resource. If not provided, all are considered. Required format: “${SERVICE_DOMAIN}/${RESOURCE_SINGLE_NAME_CAMEL}, for example: “devices.service.com/Device”
source_region string Source region indicates that this rule prevents syncing into this region. If left blank, then all regions are considered.
dest_region string Dest region indicates that this rule prevents syncing from this region. If left blank, then all regions are considered.

goten.types Shared Enumerations

Here is the list of goten.types shared enumerations:

Lifecycle.State Enumeration

current resource state

Name Description
UNDEFINED Must never be used
ACTIVE Resource is up and running
DELETING Resource is in slow-deletion process.

View Enumeration

View defines list of fields of the resource that will be obtained in servers response.

Name Description
UNSPECIFIED
NAME
BASIC
DETAIL
FULL

WatchType Enumeration

WatchType defines how client wants to subscribe for real-time updates when making Watch request.

Name Description
STATEFUL In a Stateful type, by default first watch response contains whole snapshot of a given query according to the provided filter, field mask, order by fields. Paging is supported (page token and size can be used), but resuming not (resume token cannot be used). Reason is, that server drops all state for given watch session after disconnection and cannot match resuming token with some known state. Subsequent responses will contain incremental changes to the initially given snapshot. Server will provide additional information like index positions (and changes of those). It is possible to split snapshot and incremental changes into chunks (and therefore, many watch responses) by using maximum chunk size field in a request. In that case, client is expected to check the appropriate flag in each response messages to find a marker when “complete” message finishes. Clients should specify at least chunk size or page size. If none of them are present, server may enforce own limit on number of resources (page size) and return snapshot with next page token, if that limit was exceeded. If page size is accepted by the server (not too big), then response may be chunked only on user wish, but its not necessary. This type is made for users desiring real-time updates of a defined pages for use in for example UI dashboards, which is typical case when users are capped by a page size.
STATELESS In a stateless type, initial snapshot of a query is sent within N watch responses (N = (NumRes / ChunkSize)), where: NumRes is a number of resources passing optional filter specified in a request (and parent if applicable), and ChunkSize is a maximum number of resource changes allowed to be included in a single Watch<Collection>Response. This chunk size should be specified in request object. Ordering and paging is not supported: request must not specify page token, order by fields or page size. Response object will never contain next/prev page tokens and index positions inside resource change objects must be ignored by a client. Field mask is allowed to be used. As client is supposed to contain state of the session, it is allowed to use resumption tokens and it may be provided with response. Server cannot tell the difference between added or modified resource - instead of using “Add” or “Modified” change types, server uses stateless “Set” type. The only common part is “Removed” type. If client does not specify chunk size, server may enforce its own default value. This type is made for users that do not care about ordering or paging but need general view of a set of resources in the unordered fashion, for example controllers. The benefit of this type, is that number of resources is never capped.