entity

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

README

Unified Storage

The unified storage projects aims to provide a simple and extensible backend to unify the way we store different objects within the Grafana app platform.

It provides generic storage for k8s objects, and can store data either within dedicated tables in the main Grafana database, or in separate storage.

By default it runs in-process within Grafana, but it can also be run as a standalone GRPC service (storage-server).

Storage Overview

There are 2 main tables, the entity table stores a "current" view of the objects, and the entity_history table stores a record of each revision of a given object.

Running Unified Storage

Baseline configuration

The minimum config settings required are:

; need to specify target here for override to work later
target = all

[server]
; https is required for kubectl
protocol = https

[feature_toggles]
; enable unified storage
unifiedStorage = true
; enable k8s apiserver
grafanaAPIServer = true
; store playlists in k8s
kubernetesPlaylists = true
; store json id token in context
idForwarding = true

[grafana-apiserver]
; use unified storage for k8s apiserver
storage_type = unified

With this configuration, you can run everything in-process. Run the Grafana backend with:

bra run

or

make run

The default kubeconfig sends requests directly to the apiserver, to authenticate as a grafana user, create grafana.kubeconfig:

apiVersion: v1
clusters:
- cluster:
    insecure-skip-tls-verify: true
    server: https://127.0.0.1:3000
  name: default-cluster
contexts:
- context:
    cluster: default-cluster
    namespace: default
    user: default
  name: default-context
current-context: default-context
kind: Config
preferences: {}
users:
- name: default
  user:
    username: <username>
    password: <password>

Where <username> and <password> are credentials for basic auth against Grafana. For example, with the default credentials:

    username: admin
    password: admin

In this mode, you can interact with the k8s api. Make sure you are in the directory where you created grafana.kubeconfig. Then run:

kubectl --kubeconfig=./grafana.kubeconfig get playlist

If this is your first time running the command, a successful response would be:

No resources found in default namespace.

To create a playlist, create a file playlist-generate.yaml:

apiVersion: playlist.grafana.app/v0alpha1
kind: Playlist
metadata:
  generateName: x # anything is ok here... except yes or true -- they become boolean!
  labels:
    foo: bar
  annotations:
    grafana.app/slug: "slugger"
    grafana.app/updatedBy: "updater"
spec:
  title: Playlist with auto generated UID
  interval: 5m
  items:
  - type: dashboard_by_tag
    value: panel-tests
  - type: dashboard_by_uid
    value: vmie2cmWz # dashboard from devenv

then run:

kubectl --kubeconfig=./grafana.kubeconfig create -f playlist-generate.yaml

For example, a successful response would be:

playlist.playlist.grafana.app/u394j4d3-s63j-2d74-g8hf-958773jtybf2 created

When running

kubectl --kubeconfig=./grafana.kubeconfig get playlist

you should now see something like:

NAME                                   TITLE                              INTERVAL   CREATED AT
u394j4d3-s63j-2d74-g8hf-958773jtybf2   Playlist with auto generated UID   5m         2023-12-14T13:53:35Z 

To update the playlist, update the playlist-generate.yaml file then run:

kubectl --kubeconfig=./grafana.kubeconfig patch playlist <NAME> --patch-file playlist-generate.yaml

In the example, <NAME> would be u394j4d3-s63j-2d74-g8hf-958773jtybf2.

Use a separate database

By default Unified Storage uses the Grafana database. To run against a separate database, update custom.ini by adding the following section to it:

[entity_api]
db_type = mysql
db_host = localhost:3306
db_name = grafana
db_user = <username>
db_pass = <password>

MySQL and Postgres are both supported. The <username> and <password> values can be found in the following devenv docker compose files: MySQL and Postgres.

Then, run

make devenv sources=<source>

where source is either mysql or postgres.

Finally, run the Grafana backend with

bra run

or

make run
Run as a GRPC service
Start GRPC storage-server

This currently only works with a separate database configuration (see previous section).

Start the storage-server with:

GF_DEFAULT_TARGET=storage-server ./bin/grafana server target

The GRPC service will listen on port 10000

Use GRPC server

To run grafana against the storage-server, override the storage_type setting:

GF_GRAFANA_APISERVER_STORAGE_TYPE=unified-grpc ./bin/grafana server

You can then list the previously-created playlists with:

kubectl --kubeconfig=./grafana.kubeconfig get playlist

Changing protobuf interface

  • install protoc
  • install the protocol compiler plugin for Go
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
  • make changes in .proto file
  • to compile all protobuf files in the repository run make protobuf at its top level

Documentation

Index

Constants

View Source
const (
	EntityStore_Read_FullMethodName      = "/entity.EntityStore/Read"
	EntityStore_Create_FullMethodName    = "/entity.EntityStore/Create"
	EntityStore_Update_FullMethodName    = "/entity.EntityStore/Update"
	EntityStore_Delete_FullMethodName    = "/entity.EntityStore/Delete"
	EntityStore_History_FullMethodName   = "/entity.EntityStore/History"
	EntityStore_List_FullMethodName      = "/entity.EntityStore/List"
	EntityStore_Watch_FullMethodName     = "/entity.EntityStore/Watch"
	EntityStore_IsHealthy_FullMethodName = "/entity.EntityStore/IsHealthy"
)
View Source
const (
	StandardKindDashboard = "dashboard"
	StandardKindPlaylist  = "playlist"
	StandardKindFolder    = "folder"

	// StandardKindDataSource: not a real kind yet, but used to define references from dashboards
	// Types: influx, prometheus, testdata, ...
	StandardKindDataSource = "ds"

	// StandardKindPanel: only used for searchV2 right now
	// Standalone panel is not an object kind yet -- library panel, or nested in dashboard
	StandardKindPanel = "panel"

	// StandardKindJSONObj generic json object
	StandardKindJSONObj = "jsonobj"

	// StandardKindQuery early development on panel query library
	// the kind may need to change to better encapsulate { targets:[], transforms:[] }
	StandardKindQuery = "query"

	// StandardKindAlertRule is not a real kind. It's used to refer to alert rules, for instance
	// in the folder registry service.
	StandardKindAlertRule = "alertrule"

	// StandardKindLibraryPanel is for library panels
	StandardKindLibraryPanel = "librarypanel"

	// ExternalEntityReferencePlugin: requires a plugin to be installed
	ExternalEntityReferencePlugin = "plugin"

	// ExternalEntityReferenceRuntime: frontend runtime requirements
	ExternalEntityReferenceRuntime = "runtime"

	// ExternalEntityReferenceRuntime_Transformer is a "type" under runtime
	// UIDs include: joinByField, organize, seriesToColumns, etc
	ExternalEntityReferenceRuntime_Transformer = "transformer"
)

Variables

View Source
var (
	Entity_Action_name = map[int32]string{
		0: "UNKNOWN",
		1: "CREATED",
		2: "UPDATED",
		3: "DELETED",
		4: "ERROR",
		5: "BOOKMARK",
	}
	Entity_Action_value = map[string]int32{
		"UNKNOWN":  0,
		"CREATED":  1,
		"UPDATED":  2,
		"DELETED":  3,
		"ERROR":    4,
		"BOOKMARK": 5,
	}
)

Enum value maps for Entity_Action.

View Source
var (
	CreateEntityResponse_Status_name = map[int32]string{
		0: "ERROR",
		1: "CREATED",
	}
	CreateEntityResponse_Status_value = map[string]int32{
		"ERROR":   0,
		"CREATED": 1,
	}
)

Enum value maps for CreateEntityResponse_Status.

View Source
var (
	UpdateEntityResponse_Status_name = map[int32]string{
		0: "ERROR",
		1: "UPDATED",
		2: "UNCHANGED",
	}
	UpdateEntityResponse_Status_value = map[string]int32{
		"ERROR":     0,
		"UPDATED":   1,
		"UNCHANGED": 2,
	}
)

Enum value maps for UpdateEntityResponse_Status.

View Source
var (
	DeleteEntityResponse_Status_name = map[int32]string{
		0: "ERROR",
		1: "DELETED",
		2: "NOTFOUND",
	}
	DeleteEntityResponse_Status_value = map[string]int32{
		"ERROR":    0,
		"DELETED":  1,
		"NOTFOUND": 2,
	}
)

Enum value maps for DeleteEntityResponse_Status.

View Source
var (
	EntityWatchRequest_WatchAction_name = map[int32]string{
		0: "START",
		1: "STOP",
	}
	EntityWatchRequest_WatchAction_value = map[string]int32{
		"START": 0,
		"STOP":  1,
	}
)

Enum value maps for EntityWatchRequest_WatchAction.

View Source
var (
	HealthCheckResponse_ServingStatus_name = map[int32]string{
		0: "UNKNOWN",
		1: "SERVING",
		2: "NOT_SERVING",
		3: "SERVICE_UNKNOWN",
	}
	HealthCheckResponse_ServingStatus_value = map[string]int32{
		"UNKNOWN":         0,
		"SERVING":         1,
		"NOT_SERVING":     2,
		"SERVICE_UNKNOWN": 3,
	}
)

Enum value maps for HealthCheckResponse_ServingStatus.

View Source
var EntityStore_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "entity.EntityStore",
	HandlerType: (*EntityStoreServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Read",
			Handler:    _EntityStore_Read_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _EntityStore_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _EntityStore_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _EntityStore_Delete_Handler,
		},
		{
			MethodName: "History",
			Handler:    _EntityStore_History_Handler,
		},
		{
			MethodName: "List",
			Handler:    _EntityStore_List_Handler,
		},
		{
			MethodName: "IsHealthy",
			Handler:    _EntityStore_IsHealthy_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _EntityStore_Watch_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "entity.proto",
}

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

View Source
var File_entity_proto protoreflect.FileDescriptor

Functions

func ProvideHealthService

func ProvideHealthService(server EntityStoreServer) (grpc_health_v1.HealthServer, error)

func RegisterEntityStoreServer

func RegisterEntityStoreServer(s grpc.ServiceRegistrar, srv EntityStoreServer)

Types

type CreateEntityRequest

type CreateEntityRequest struct {

	// Entity details
	Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateEntityRequest) Descriptor deprecated

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

Deprecated: Use CreateEntityRequest.ProtoReflect.Descriptor instead.

func (*CreateEntityRequest) GetEntity

func (x *CreateEntityRequest) GetEntity() *Entity

func (*CreateEntityRequest) ProtoMessage

func (*CreateEntityRequest) ProtoMessage()

func (*CreateEntityRequest) ProtoReflect

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

func (*CreateEntityRequest) Reset

func (x *CreateEntityRequest) Reset()

func (*CreateEntityRequest) String

func (x *CreateEntityRequest) String() string

type CreateEntityResponse

type CreateEntityResponse struct {

	// Error info -- if exists, the save did not happen
	Error *EntityErrorInfo `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// Entity details
	Entity *Entity `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"`
	// Status code
	Status CreateEntityResponse_Status `protobuf:"varint,3,opt,name=status,proto3,enum=entity.CreateEntityResponse_Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateEntityResponse) Descriptor deprecated

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

Deprecated: Use CreateEntityResponse.ProtoReflect.Descriptor instead.

func (*CreateEntityResponse) GetEntity

func (x *CreateEntityResponse) GetEntity() *Entity

func (*CreateEntityResponse) GetError

func (x *CreateEntityResponse) GetError() *EntityErrorInfo

func (*CreateEntityResponse) GetStatus

func (*CreateEntityResponse) ProtoMessage

func (*CreateEntityResponse) ProtoMessage()

func (*CreateEntityResponse) ProtoReflect

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

func (*CreateEntityResponse) Reset

func (x *CreateEntityResponse) Reset()

func (*CreateEntityResponse) String

func (x *CreateEntityResponse) String() string

type CreateEntityResponse_Status

type CreateEntityResponse_Status int32

Status enumeration

const (
	CreateEntityResponse_ERROR   CreateEntityResponse_Status = 0
	CreateEntityResponse_CREATED CreateEntityResponse_Status = 1
)

func (CreateEntityResponse_Status) Descriptor

func (CreateEntityResponse_Status) Enum

func (CreateEntityResponse_Status) EnumDescriptor deprecated

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

Deprecated: Use CreateEntityResponse_Status.Descriptor instead.

func (CreateEntityResponse_Status) Number

func (CreateEntityResponse_Status) String

func (CreateEntityResponse_Status) Type

type DeleteEntityRequest

type DeleteEntityRequest struct {

	// Entity identifier
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Used for optimistic locking.  If missing, the current version will be deleted regardless
	PreviousVersion int64 `protobuf:"varint,2,opt,name=previous_version,json=previousVersion,proto3" json:"previous_version,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteEntityRequest) Descriptor deprecated

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

Deprecated: Use DeleteEntityRequest.ProtoReflect.Descriptor instead.

func (*DeleteEntityRequest) GetKey

func (x *DeleteEntityRequest) GetKey() string

func (*DeleteEntityRequest) GetPreviousVersion

func (x *DeleteEntityRequest) GetPreviousVersion() int64

func (*DeleteEntityRequest) ProtoMessage

func (*DeleteEntityRequest) ProtoMessage()

func (*DeleteEntityRequest) ProtoReflect

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

func (*DeleteEntityRequest) Reset

func (x *DeleteEntityRequest) Reset()

func (*DeleteEntityRequest) String

func (x *DeleteEntityRequest) String() string

type DeleteEntityResponse

type DeleteEntityResponse struct {

	// Error info -- if exists, the delete did not happen
	Error *EntityErrorInfo `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// Entity details
	Entity *Entity `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"`
	// Status code
	Status DeleteEntityResponse_Status `protobuf:"varint,3,opt,name=status,proto3,enum=entity.DeleteEntityResponse_Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteEntityResponse) Descriptor deprecated

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

Deprecated: Use DeleteEntityResponse.ProtoReflect.Descriptor instead.

func (*DeleteEntityResponse) GetEntity

func (x *DeleteEntityResponse) GetEntity() *Entity

func (*DeleteEntityResponse) GetError

func (x *DeleteEntityResponse) GetError() *EntityErrorInfo

func (*DeleteEntityResponse) GetStatus

func (*DeleteEntityResponse) ProtoMessage

func (*DeleteEntityResponse) ProtoMessage()

func (*DeleteEntityResponse) ProtoReflect

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

func (*DeleteEntityResponse) Reset

func (x *DeleteEntityResponse) Reset()

func (*DeleteEntityResponse) String

func (x *DeleteEntityResponse) String() string

type DeleteEntityResponse_Status

type DeleteEntityResponse_Status int32

Status enumeration

const (
	DeleteEntityResponse_ERROR    DeleteEntityResponse_Status = 0
	DeleteEntityResponse_DELETED  DeleteEntityResponse_Status = 1
	DeleteEntityResponse_NOTFOUND DeleteEntityResponse_Status = 2
)

func (DeleteEntityResponse_Status) Descriptor

func (DeleteEntityResponse_Status) Enum

func (DeleteEntityResponse_Status) EnumDescriptor deprecated

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

Deprecated: Use DeleteEntityResponse_Status.Descriptor instead.

func (DeleteEntityResponse_Status) Number

func (DeleteEntityResponse_Status) String

func (DeleteEntityResponse_Status) Type

type Entity

type Entity struct {

	// Globally unique ID set by the system.  This can not be set explicitly
	Guid string `protobuf:"bytes,1,opt,name=guid,proto3" json:"guid,omitempty"`
	// The resource version, this is a snowflake id controlled by storage
	ResourceVersion int64 `protobuf:"varint,2,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"`
	// group
	Group string `protobuf:"bytes,24,opt,name=group,proto3" json:"group,omitempty"`
	// kind resource
	Resource string `protobuf:"bytes,25,opt,name=resource,proto3" json:"resource,omitempty"`
	// namespace
	Namespace string `protobuf:"bytes,26,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// k8s name
	Name string `protobuf:"bytes,27,opt,name=name,proto3" json:"name,omitempty"`
	// subresource
	Subresource string `protobuf:"bytes,28,opt,name=subresource,proto3" json:"subresource,omitempty"`
	// group version
	GroupVersion string `protobuf:"bytes,23,opt,name=group_version,json=groupVersion,proto3" json:"group_version,omitempty"`
	// k8s key value (TODO remove -- it is duplicate of group+resource+version)
	Key string `protobuf:"bytes,22,opt,name=key,proto3" json:"key,omitempty"`
	// The folder k8s name
	Folder string `protobuf:"bytes,4,opt,name=folder,proto3" json:"folder,omitempty"`
	// Raw meta from k8s
	Meta []byte `protobuf:"bytes,5,opt,name=meta,proto3" json:"meta,omitempty"`
	// Raw bytes of the storage entity.  The kind will determine what is a valid payload
	Body []byte `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"`
	// k8s style status (ignored for now)
	Status []byte `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
	// the friendly name of the entity
	Title string `protobuf:"bytes,8,opt,name=title,proto3" json:"title,omitempty"`
	// Content Length
	Size int64 `protobuf:"varint,9,opt,name=size,proto3" json:"size,omitempty"`
	// MD5 digest of the body
	ETag string `protobuf:"bytes,10,opt,name=ETag,proto3" json:"ETag,omitempty"`
	// Time in epoch milliseconds that the entity was created
	CreatedAt int64 `protobuf:"varint,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Who created the entity
	CreatedBy string `protobuf:"bytes,12,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
	// Time in epoch milliseconds that the entity was updated
	UpdatedAt int64 `protobuf:"varint,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// Who updated the entity
	UpdatedBy string `protobuf:"bytes,14,opt,name=updated_by,json=updatedBy,proto3" json:"updated_by,omitempty"`
	// External location info
	Origin *EntityOriginInfo `protobuf:"bytes,15,opt,name=origin,proto3" json:"origin,omitempty"`
	// human-readable description of the entity
	Description string `protobuf:"bytes,16,opt,name=description,proto3" json:"description,omitempty"`
	// URL safe version of the name.  It will be unique within the folder
	Slug string `protobuf:"bytes,17,opt,name=slug,proto3" json:"slug,omitempty"`
	// Commit message (optional)
	Message string `protobuf:"bytes,18,opt,name=message,proto3" json:"message,omitempty"`
	// Key value pairs.  Tags are are represented as keys with empty values
	Labels map[string]string `` /* 154-byte string literal not displayed */
	// Optional field values.  The schema will define and document possible values for a given kind
	Fields map[string]string `` /* 154-byte string literal not displayed */
	// When errors exist
	Errors []*EntityErrorInfo `protobuf:"bytes,21,rep,name=errors,proto3" json:"errors,omitempty"`
	// Action code
	Action Entity_Action `protobuf:"varint,3,opt,name=action,proto3,enum=entity.Entity_Action" json:"action,omitempty"`
	// contains filtered or unexported fields
}

The canonical entity/document data -- this represents the raw bytes and storage level metadata

func (*Entity) Descriptor deprecated

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

Deprecated: Use Entity.ProtoReflect.Descriptor instead.

func (*Entity) GetAction

func (x *Entity) GetAction() Entity_Action

func (*Entity) GetBody

func (x *Entity) GetBody() []byte

func (*Entity) GetCreatedAt

func (x *Entity) GetCreatedAt() int64

func (*Entity) GetCreatedBy

func (x *Entity) GetCreatedBy() string

func (*Entity) GetDescription

func (x *Entity) GetDescription() string

func (*Entity) GetETag

func (x *Entity) GetETag() string

func (*Entity) GetErrors

func (x *Entity) GetErrors() []*EntityErrorInfo

func (*Entity) GetFields

func (x *Entity) GetFields() map[string]string

func (*Entity) GetFolder

func (x *Entity) GetFolder() string

func (*Entity) GetGroup

func (x *Entity) GetGroup() string

func (*Entity) GetGroupVersion

func (x *Entity) GetGroupVersion() string

func (*Entity) GetGuid

func (x *Entity) GetGuid() string

func (*Entity) GetKey

func (x *Entity) GetKey() string

func (*Entity) GetLabels

func (x *Entity) GetLabels() map[string]string

func (*Entity) GetMessage

func (x *Entity) GetMessage() string

func (*Entity) GetMeta

func (x *Entity) GetMeta() []byte

func (*Entity) GetName

func (x *Entity) GetName() string

func (*Entity) GetNamespace

func (x *Entity) GetNamespace() string

func (*Entity) GetOrigin

func (x *Entity) GetOrigin() *EntityOriginInfo

func (*Entity) GetResource

func (x *Entity) GetResource() string

func (*Entity) GetResourceVersion

func (x *Entity) GetResourceVersion() int64

func (*Entity) GetSize

func (x *Entity) GetSize() int64

func (*Entity) GetSlug

func (x *Entity) GetSlug() string

func (*Entity) GetStatus

func (x *Entity) GetStatus() []byte

func (*Entity) GetSubresource

func (x *Entity) GetSubresource() string

func (*Entity) GetTitle

func (x *Entity) GetTitle() string

func (*Entity) GetUpdatedAt

func (x *Entity) GetUpdatedAt() int64

func (*Entity) GetUpdatedBy

func (x *Entity) GetUpdatedBy() string

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) ProtoReflect

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

func (*Entity) Reset

func (x *Entity) Reset()

func (*Entity) String

func (x *Entity) String() string

type EntityErrorInfo

type EntityErrorInfo struct {

	// Match an error code registry?
	Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// Simple error display
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// Details encoded in JSON
	DetailsJson []byte `protobuf:"bytes,3,opt,name=details_json,json=detailsJson,proto3" json:"details_json,omitempty"`
	// contains filtered or unexported fields
}

Report error while working with entitys NOTE: real systems at scale will contain errors.

func (*EntityErrorInfo) Descriptor deprecated

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

Deprecated: Use EntityErrorInfo.ProtoReflect.Descriptor instead.

func (*EntityErrorInfo) GetCode

func (x *EntityErrorInfo) GetCode() int64

func (*EntityErrorInfo) GetDetailsJson

func (x *EntityErrorInfo) GetDetailsJson() []byte

func (*EntityErrorInfo) GetMessage

func (x *EntityErrorInfo) GetMessage() string

func (*EntityErrorInfo) ProtoMessage

func (*EntityErrorInfo) ProtoMessage()

func (*EntityErrorInfo) ProtoReflect

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

func (*EntityErrorInfo) Reset

func (x *EntityErrorInfo) Reset()

func (*EntityErrorInfo) String

func (x *EntityErrorInfo) String() string

type EntityExternalReference

type EntityExternalReference struct {

	// Category of dependency
	// eg: datasource, plugin, runtime
	Family string `protobuf:"bytes,1,opt,name=family,proto3" json:"family,omitempty"`
	// datasource > prometheus|influx|...
	// plugin > panel | datasource
	// runtime > transformer
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// datasource > UID
	// plugin > plugin identifier
	// runtime > name lookup
	Identifier string `protobuf:"bytes,3,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// contains filtered or unexported fields
}

func (*EntityExternalReference) Descriptor deprecated

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

Deprecated: Use EntityExternalReference.ProtoReflect.Descriptor instead.

func (*EntityExternalReference) GetFamily

func (x *EntityExternalReference) GetFamily() string

func (*EntityExternalReference) GetIdentifier

func (x *EntityExternalReference) GetIdentifier() string

func (*EntityExternalReference) GetType

func (x *EntityExternalReference) GetType() string

func (*EntityExternalReference) ProtoMessage

func (*EntityExternalReference) ProtoMessage()

func (*EntityExternalReference) ProtoReflect

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

func (*EntityExternalReference) Reset

func (x *EntityExternalReference) Reset()

func (*EntityExternalReference) String

func (x *EntityExternalReference) String() string

type EntityHistoryRequest

type EntityHistoryRequest struct {

	// Entity identifier
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// return the history from before this version
	Before int64 `protobuf:"varint,2,opt,name=before,proto3" json:"before,omitempty"`
	// Maximum number of items to return
	Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// guid of the entity
	Guid string `protobuf:"bytes,4,opt,name=guid,proto3" json:"guid,omitempty"`
	// Starting from the requested page
	NextPageToken string `protobuf:"bytes,5,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// Sorting instructions `field ASC/DESC`
	Sort []string `protobuf:"bytes,7,rep,name=sort,proto3" json:"sort,omitempty"`
	// Return the full body in each payload
	WithBody bool `protobuf:"varint,8,opt,name=with_body,json=withBody,proto3" json:"with_body,omitempty"`
	// Return the status in each payload
	WithStatus bool `protobuf:"varint,10,opt,name=with_status,json=withStatus,proto3" json:"with_status,omitempty"`
	// contains filtered or unexported fields
}

func (*EntityHistoryRequest) Descriptor deprecated

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

Deprecated: Use EntityHistoryRequest.ProtoReflect.Descriptor instead.

func (*EntityHistoryRequest) GetBefore

func (x *EntityHistoryRequest) GetBefore() int64

func (*EntityHistoryRequest) GetGuid

func (x *EntityHistoryRequest) GetGuid() string

func (*EntityHistoryRequest) GetKey

func (x *EntityHistoryRequest) GetKey() string

func (*EntityHistoryRequest) GetLimit

func (x *EntityHistoryRequest) GetLimit() int64

func (*EntityHistoryRequest) GetNextPageToken

func (x *EntityHistoryRequest) GetNextPageToken() string

func (*EntityHistoryRequest) GetSort

func (x *EntityHistoryRequest) GetSort() []string

func (*EntityHistoryRequest) GetWithBody

func (x *EntityHistoryRequest) GetWithBody() bool

func (*EntityHistoryRequest) GetWithStatus

func (x *EntityHistoryRequest) GetWithStatus() bool

func (*EntityHistoryRequest) ProtoMessage

func (*EntityHistoryRequest) ProtoMessage()

func (*EntityHistoryRequest) ProtoReflect

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

func (*EntityHistoryRequest) Reset

func (x *EntityHistoryRequest) Reset()

func (*EntityHistoryRequest) String

func (x *EntityHistoryRequest) String() string

type EntityHistoryResponse

type EntityHistoryResponse struct {

	// Entity identifier
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Entity metadata without the raw bytes
	Versions []*Entity `protobuf:"bytes,2,rep,name=versions,proto3" json:"versions,omitempty"`
	// More results exist... pass this in the next request
	NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// Resource version of the response
	ResourceVersion int64 `protobuf:"varint,4,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"`
	// contains filtered or unexported fields
}

func (*EntityHistoryResponse) Descriptor deprecated

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

Deprecated: Use EntityHistoryResponse.ProtoReflect.Descriptor instead.

func (*EntityHistoryResponse) GetKey

func (x *EntityHistoryResponse) GetKey() string

func (*EntityHistoryResponse) GetNextPageToken

func (x *EntityHistoryResponse) GetNextPageToken() string

func (*EntityHistoryResponse) GetResourceVersion

func (x *EntityHistoryResponse) GetResourceVersion() int64

func (*EntityHistoryResponse) GetVersions

func (x *EntityHistoryResponse) GetVersions() []*Entity

func (*EntityHistoryResponse) ProtoMessage

func (*EntityHistoryResponse) ProtoMessage()

func (*EntityHistoryResponse) ProtoReflect

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

func (*EntityHistoryResponse) Reset

func (x *EntityHistoryResponse) Reset()

func (*EntityHistoryResponse) String

func (x *EntityHistoryResponse) String() string

type EntityListRequest

type EntityListRequest struct {

	// Starting from the requested page (other query parameters must match!)
	NextPageToken string `protobuf:"bytes,1,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// Maximum number of items to return
	Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// Free text query string -- mileage may vary :)
	Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
	// limit to a specific group (empty is all)
	Group []string `protobuf:"bytes,9,rep,name=group,proto3" json:"group,omitempty"`
	// limit to a specific resource (empty is all)
	Resource []string `protobuf:"bytes,4,rep,name=resource,proto3" json:"resource,omitempty"`
	// limit to a specific key
	Key []string `protobuf:"bytes,11,rep,name=key,proto3" json:"key,omitempty"`
	// Limit results to items in a specific folder
	Folder string `protobuf:"bytes,5,opt,name=folder,proto3" json:"folder,omitempty"`
	// Must match all labels
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// Sorting instructions `field ASC/DESC`
	Sort []string `protobuf:"bytes,7,rep,name=sort,proto3" json:"sort,omitempty"`
	// Return the full body in each payload
	WithBody bool `protobuf:"varint,8,opt,name=with_body,json=withBody,proto3" json:"with_body,omitempty"`
	// Return the full body in each payload
	WithStatus bool `protobuf:"varint,10,opt,name=with_status,json=withStatus,proto3" json:"with_status,omitempty"`
	// list deleted entities instead of active ones
	Deleted bool `protobuf:"varint,12,opt,name=deleted,proto3" json:"deleted,omitempty"`
	// Limit to a set of origin keys (empty is all)
	OriginKeys []string `protobuf:"bytes,13,rep,name=origin_keys,json=originKeys,proto3" json:"origin_keys,omitempty"`
	// contains filtered or unexported fields
}

func (*EntityListRequest) Descriptor deprecated

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

Deprecated: Use EntityListRequest.ProtoReflect.Descriptor instead.

func (*EntityListRequest) GetDeleted

func (x *EntityListRequest) GetDeleted() bool

func (*EntityListRequest) GetFolder

func (x *EntityListRequest) GetFolder() string

func (*EntityListRequest) GetGroup

func (x *EntityListRequest) GetGroup() []string

func (*EntityListRequest) GetKey

func (x *EntityListRequest) GetKey() []string

func (*EntityListRequest) GetLabels

func (x *EntityListRequest) GetLabels() map[string]string

func (*EntityListRequest) GetLimit

func (x *EntityListRequest) GetLimit() int64

func (*EntityListRequest) GetNextPageToken

func (x *EntityListRequest) GetNextPageToken() string

func (*EntityListRequest) GetOriginKeys

func (x *EntityListRequest) GetOriginKeys() []string

func (*EntityListRequest) GetQuery

func (x *EntityListRequest) GetQuery() string

func (*EntityListRequest) GetResource

func (x *EntityListRequest) GetResource() []string

func (*EntityListRequest) GetSort

func (x *EntityListRequest) GetSort() []string

func (*EntityListRequest) GetWithBody

func (x *EntityListRequest) GetWithBody() bool

func (*EntityListRequest) GetWithStatus

func (x *EntityListRequest) GetWithStatus() bool

func (*EntityListRequest) ProtoMessage

func (*EntityListRequest) ProtoMessage()

func (*EntityListRequest) ProtoReflect

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

func (*EntityListRequest) Reset

func (x *EntityListRequest) Reset()

func (*EntityListRequest) String

func (x *EntityListRequest) String() string

type EntityListResponse

type EntityListResponse struct {
	Results []*Entity `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// More results exist... pass this in the next request
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// ResourceVersion of the list response
	ResourceVersion int64 `protobuf:"varint,3,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"`
	// contains filtered or unexported fields
}

func (*EntityListResponse) Descriptor deprecated

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

Deprecated: Use EntityListResponse.ProtoReflect.Descriptor instead.

func (*EntityListResponse) GetNextPageToken

func (x *EntityListResponse) GetNextPageToken() string

func (*EntityListResponse) GetResourceVersion

func (x *EntityListResponse) GetResourceVersion() int64

func (*EntityListResponse) GetResults

func (x *EntityListResponse) GetResults() []*Entity

func (*EntityListResponse) ProtoMessage

func (*EntityListResponse) ProtoMessage()

func (*EntityListResponse) ProtoReflect

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

func (*EntityListResponse) Reset

func (x *EntityListResponse) Reset()

func (*EntityListResponse) String

func (x *EntityListResponse) String() string

type EntityOriginInfo

type EntityOriginInfo struct {

	// identify the external source (plugin, git instance, etc)
	Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	// Key in the upstream system (git hash, file path, etc)
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// Time in epoch milliseconds that the entity was last synced with an external system (provisioning/git)
	Time int64 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

This stores additional metadata for items entities that were synced from external systmes

func (*EntityOriginInfo) Descriptor deprecated

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

Deprecated: Use EntityOriginInfo.ProtoReflect.Descriptor instead.

func (*EntityOriginInfo) GetKey

func (x *EntityOriginInfo) GetKey() string

func (*EntityOriginInfo) GetSource

func (x *EntityOriginInfo) GetSource() string

func (*EntityOriginInfo) GetTime

func (x *EntityOriginInfo) GetTime() int64

func (*EntityOriginInfo) ProtoMessage

func (*EntityOriginInfo) ProtoMessage()

func (*EntityOriginInfo) ProtoReflect

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

func (*EntityOriginInfo) Reset

func (x *EntityOriginInfo) Reset()

func (*EntityOriginInfo) String

func (x *EntityOriginInfo) String() string

type EntityStoreClient

EntityStoreClient is the client API for EntityStore 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 NewEntityStoreClientGRPC

func NewEntityStoreClientGRPC(channel *grpc.ClientConn) EntityStoreClient

func NewEntityStoreClientLocal

func NewEntityStoreClientLocal(server EntityStoreServer) EntityStoreClient

type EntityStoreServer

EntityStoreServer is the server API for EntityStore service. All implementations should embed UnimplementedEntityStoreServer for forward compatibility

type EntityStore_WatchClient

type EntityStore_WatchClient interface {
	Send(*EntityWatchRequest) error
	Recv() (*EntityWatchResponse, error)
	grpc.ClientStream
}

type EntityStore_WatchServer

type EntityStore_WatchServer interface {
	Send(*EntityWatchResponse) error
	Recv() (*EntityWatchRequest, error)
	grpc.ServerStream
}

type EntitySummary

type EntitySummary struct {
	UID         string `protobuf:"bytes,1,opt,name=UID,proto3" json:"UID,omitempty"`
	Kind        string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
	Name        string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// Key value pairs.  Tags are are represented as keys with empty values
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// Parent folder UID
	Folder string `protobuf:"bytes,6,opt,name=folder,proto3" json:"folder,omitempty"`
	// URL safe version of the name.  It will be unique within the folder
	Slug string `protobuf:"bytes,7,opt,name=slug,proto3" json:"slug,omitempty"`
	// When errors exist
	Error *EntityErrorInfo `protobuf:"bytes,8,opt,name=error,proto3" json:"error,omitempty"`
	// Optional field values.  The schema will define and document possible values for a given kind
	Fields map[string]string `` /* 153-byte string literal not displayed */
	// eg: panels within dashboard
	Nested []*EntitySummary `protobuf:"bytes,10,rep,name=nested,proto3" json:"nested,omitempty"`
	// Optional references to external things
	References []*EntityExternalReference `protobuf:"bytes,11,rep,name=references,proto3" json:"references,omitempty"`
	// contains filtered or unexported fields
}

func (*EntitySummary) Descriptor deprecated

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

Deprecated: Use EntitySummary.ProtoReflect.Descriptor instead.

func (*EntitySummary) GetDescription

func (x *EntitySummary) GetDescription() string

func (*EntitySummary) GetError

func (x *EntitySummary) GetError() *EntityErrorInfo

func (*EntitySummary) GetFields

func (x *EntitySummary) GetFields() map[string]string

func (*EntitySummary) GetFolder

func (x *EntitySummary) GetFolder() string

func (*EntitySummary) GetKind

func (x *EntitySummary) GetKind() string

func (*EntitySummary) GetLabels

func (x *EntitySummary) GetLabels() map[string]string

func (*EntitySummary) GetName

func (x *EntitySummary) GetName() string

func (*EntitySummary) GetNested

func (x *EntitySummary) GetNested() []*EntitySummary

func (*EntitySummary) GetReferences

func (x *EntitySummary) GetReferences() []*EntityExternalReference

func (*EntitySummary) GetSlug

func (x *EntitySummary) GetSlug() string

func (*EntitySummary) GetUID

func (x *EntitySummary) GetUID() string

func (*EntitySummary) ProtoMessage

func (*EntitySummary) ProtoMessage()

func (*EntitySummary) ProtoReflect

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

func (*EntitySummary) Reset

func (x *EntitySummary) Reset()

func (*EntitySummary) String

func (x *EntitySummary) String() string

type EntitySummaryBuilder

type EntitySummaryBuilder = func(ctx context.Context, uid string, body []byte) (*EntitySummary, []byte, error)

EntitySummaryBuilder will read an object, validate it, and return a summary, sanitized payload, or an error This should not include values that depend on system state, only the raw object

type EntityWatchRequest

type EntityWatchRequest struct {

	// Start or stop the watch
	Action EntityWatchRequest_WatchAction `protobuf:"varint,8,opt,name=action,proto3,enum=entity.EntityWatchRequest_WatchAction" json:"action,omitempty"`
	// ResourceVersion of last changes. Empty will default to full history
	Since int64 `protobuf:"varint,1,opt,name=since,proto3" json:"since,omitempty"`
	// Watch specific entities
	Key []string `protobuf:"bytes,2,rep,name=key,proto3" json:"key,omitempty"`
	// limit to a specific resource (empty is all)
	Resource []string `protobuf:"bytes,3,rep,name=resource,proto3" json:"resource,omitempty"`
	// Limit results to items in a specific folder
	Folder string `protobuf:"bytes,4,opt,name=folder,proto3" json:"folder,omitempty"`
	// Must match all labels
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// Return the full body in each payload
	WithBody bool `protobuf:"varint,6,opt,name=with_body,json=withBody,proto3" json:"with_body,omitempty"`
	// Return the full status in each payload
	WithStatus bool `protobuf:"varint,7,opt,name=with_status,json=withStatus,proto3" json:"with_status,omitempty"`
	// Return initial events
	SendInitialEvents   bool `protobuf:"varint,9,opt,name=send_initial_events,json=sendInitialEvents,proto3" json:"send_initial_events,omitempty"`
	AllowWatchBookmarks bool `protobuf:"varint,10,opt,name=allow_watch_bookmarks,json=allowWatchBookmarks,proto3" json:"allow_watch_bookmarks,omitempty"`
	// contains filtered or unexported fields
}

func (*EntityWatchRequest) Descriptor deprecated

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

Deprecated: Use EntityWatchRequest.ProtoReflect.Descriptor instead.

func (*EntityWatchRequest) GetAction

func (*EntityWatchRequest) GetAllowWatchBookmarks

func (x *EntityWatchRequest) GetAllowWatchBookmarks() bool

func (*EntityWatchRequest) GetFolder

func (x *EntityWatchRequest) GetFolder() string

func (*EntityWatchRequest) GetKey

func (x *EntityWatchRequest) GetKey() []string

func (*EntityWatchRequest) GetLabels

func (x *EntityWatchRequest) GetLabels() map[string]string

func (*EntityWatchRequest) GetResource

func (x *EntityWatchRequest) GetResource() []string

func (*EntityWatchRequest) GetSendInitialEvents

func (x *EntityWatchRequest) GetSendInitialEvents() bool

func (*EntityWatchRequest) GetSince

func (x *EntityWatchRequest) GetSince() int64

func (*EntityWatchRequest) GetWithBody

func (x *EntityWatchRequest) GetWithBody() bool

func (*EntityWatchRequest) GetWithStatus

func (x *EntityWatchRequest) GetWithStatus() bool

func (*EntityWatchRequest) ProtoMessage

func (*EntityWatchRequest) ProtoMessage()

func (*EntityWatchRequest) ProtoReflect

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

func (*EntityWatchRequest) Reset

func (x *EntityWatchRequest) Reset()

func (*EntityWatchRequest) String

func (x *EntityWatchRequest) String() string

type EntityWatchRequest_WatchAction

type EntityWatchRequest_WatchAction int32
const (
	EntityWatchRequest_START EntityWatchRequest_WatchAction = 0
	EntityWatchRequest_STOP  EntityWatchRequest_WatchAction = 1
)

func (EntityWatchRequest_WatchAction) Descriptor

func (EntityWatchRequest_WatchAction) Enum

func (EntityWatchRequest_WatchAction) EnumDescriptor deprecated

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

Deprecated: Use EntityWatchRequest_WatchAction.Descriptor instead.

func (EntityWatchRequest_WatchAction) Number

func (EntityWatchRequest_WatchAction) String

func (EntityWatchRequest_WatchAction) Type

type EntityWatchResponse

type EntityWatchResponse struct {

	// Timestamp the event was sent
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Entity that was created, updated, or deleted
	Entity *Entity `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"`
	// previous version of the entity
	Previous *Entity `protobuf:"bytes,3,opt,name=previous,proto3" json:"previous,omitempty"`
	// contains filtered or unexported fields
}

func (*EntityWatchResponse) Descriptor deprecated

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

Deprecated: Use EntityWatchResponse.ProtoReflect.Descriptor instead.

func (*EntityWatchResponse) GetEntity

func (x *EntityWatchResponse) GetEntity() *Entity

func (*EntityWatchResponse) GetPrevious

func (x *EntityWatchResponse) GetPrevious() *Entity

func (*EntityWatchResponse) GetTimestamp

func (x *EntityWatchResponse) GetTimestamp() int64

func (*EntityWatchResponse) ProtoMessage

func (*EntityWatchResponse) ProtoMessage()

func (*EntityWatchResponse) ProtoReflect

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

func (*EntityWatchResponse) Reset

func (x *EntityWatchResponse) Reset()

func (*EntityWatchResponse) String

func (x *EntityWatchResponse) String() string

type Entity_Action

type Entity_Action int32

Status enumeration

const (
	Entity_UNKNOWN  Entity_Action = 0
	Entity_CREATED  Entity_Action = 1
	Entity_UPDATED  Entity_Action = 2
	Entity_DELETED  Entity_Action = 3
	Entity_ERROR    Entity_Action = 4
	Entity_BOOKMARK Entity_Action = 5
)

func (Entity_Action) Descriptor

func (Entity_Action) Enum

func (x Entity_Action) Enum() *Entity_Action

func (Entity_Action) EnumDescriptor deprecated

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

Deprecated: Use Entity_Action.Descriptor instead.

func (Entity_Action) Number

func (Entity_Action) String

func (x Entity_Action) String() string

func (Entity_Action) Type

type HealthCheckRequest

type HealthCheckRequest struct {
	Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthCheckRequest) Descriptor deprecated

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

Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.

func (*HealthCheckRequest) GetService

func (x *HealthCheckRequest) GetService() string

func (*HealthCheckRequest) ProtoMessage

func (*HealthCheckRequest) ProtoMessage()

func (*HealthCheckRequest) ProtoReflect

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

func (*HealthCheckRequest) Reset

func (x *HealthCheckRequest) Reset()

func (*HealthCheckRequest) String

func (x *HealthCheckRequest) String() string

type HealthCheckResponse

type HealthCheckResponse struct {
	Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=entity.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthCheckResponse) Descriptor deprecated

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

Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.

func (*HealthCheckResponse) GetStatus

func (*HealthCheckResponse) ProtoMessage

func (*HealthCheckResponse) ProtoMessage()

func (*HealthCheckResponse) ProtoReflect

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

func (*HealthCheckResponse) Reset

func (x *HealthCheckResponse) Reset()

func (*HealthCheckResponse) String

func (x *HealthCheckResponse) String() string

type HealthCheckResponse_ServingStatus

type HealthCheckResponse_ServingStatus int32
const (
	HealthCheckResponse_UNKNOWN         HealthCheckResponse_ServingStatus = 0
	HealthCheckResponse_SERVING         HealthCheckResponse_ServingStatus = 1
	HealthCheckResponse_NOT_SERVING     HealthCheckResponse_ServingStatus = 2
	HealthCheckResponse_SERVICE_UNKNOWN HealthCheckResponse_ServingStatus = 3 // Used only by the Watch method.
)

func (HealthCheckResponse_ServingStatus) Descriptor

func (HealthCheckResponse_ServingStatus) Enum

func (HealthCheckResponse_ServingStatus) EnumDescriptor deprecated

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

Deprecated: Use HealthCheckResponse_ServingStatus.Descriptor instead.

func (HealthCheckResponse_ServingStatus) Number

func (HealthCheckResponse_ServingStatus) String

func (HealthCheckResponse_ServingStatus) Type

type Key

type Key struct {
	Group       string
	Resource    string
	Namespace   string
	Name        string
	Subresource string
}

func ParseKey

func ParseKey(key string) (*Key, error)

func (*Key) IsEqual

func (k *Key) IsEqual(other *Key) bool

func (*Key) String

func (k *Key) String() string

type ReadEntityRequest

type ReadEntityRequest struct {

	// Entity identifier
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Fetch an explicit version (default is latest)
	ResourceVersion int64 `protobuf:"varint,2,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"`
	// Include the full body
	WithBody bool `protobuf:"varint,4,opt,name=with_body,json=withBody,proto3" json:"with_body,omitempty"`
	// Include the status
	WithStatus bool `protobuf:"varint,5,opt,name=with_status,json=withStatus,proto3" json:"with_status,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadEntityRequest) Descriptor deprecated

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

Deprecated: Use ReadEntityRequest.ProtoReflect.Descriptor instead.

func (*ReadEntityRequest) GetKey

func (x *ReadEntityRequest) GetKey() string

func (*ReadEntityRequest) GetResourceVersion

func (x *ReadEntityRequest) GetResourceVersion() int64

func (*ReadEntityRequest) GetWithBody

func (x *ReadEntityRequest) GetWithBody() bool

func (*ReadEntityRequest) GetWithStatus

func (x *ReadEntityRequest) GetWithStatus() bool

func (*ReadEntityRequest) ProtoMessage

func (*ReadEntityRequest) ProtoMessage()

func (*ReadEntityRequest) ProtoReflect

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

func (*ReadEntityRequest) Reset

func (x *ReadEntityRequest) Reset()

func (*ReadEntityRequest) String

func (x *ReadEntityRequest) String() string

type ReferenceRequest

type ReferenceRequest struct {

	// Starting from the requested page (other query parameters must match!)
	NextPageToken string `protobuf:"bytes,1,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// Maximum number of items to return
	Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// Free text query string -- mileage may vary :)
	Namespace string `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Group     string `protobuf:"bytes,6,opt,name=group,proto3" json:"group,omitempty"`
	Resource  string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
	// Free text query string -- mileage may vary :)
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*ReferenceRequest) Descriptor deprecated

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

Deprecated: Use ReferenceRequest.ProtoReflect.Descriptor instead.

func (*ReferenceRequest) GetGroup

func (x *ReferenceRequest) GetGroup() string

func (*ReferenceRequest) GetLimit

func (x *ReferenceRequest) GetLimit() int64

func (*ReferenceRequest) GetName

func (x *ReferenceRequest) GetName() string

func (*ReferenceRequest) GetNamespace

func (x *ReferenceRequest) GetNamespace() string

func (*ReferenceRequest) GetNextPageToken

func (x *ReferenceRequest) GetNextPageToken() string

func (*ReferenceRequest) GetResource

func (x *ReferenceRequest) GetResource() string

func (*ReferenceRequest) ProtoMessage

func (*ReferenceRequest) ProtoMessage()

func (*ReferenceRequest) ProtoReflect

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

func (*ReferenceRequest) Reset

func (x *ReferenceRequest) Reset()

func (*ReferenceRequest) String

func (x *ReferenceRequest) String() string

type UnimplementedEntityStoreServer

type UnimplementedEntityStoreServer struct {
}

UnimplementedEntityStoreServer should be embedded to have forward compatible implementations.

func (UnimplementedEntityStoreServer) Create

func (UnimplementedEntityStoreServer) Delete

func (UnimplementedEntityStoreServer) History

func (UnimplementedEntityStoreServer) IsHealthy

func (UnimplementedEntityStoreServer) List

func (UnimplementedEntityStoreServer) Read

func (UnimplementedEntityStoreServer) Update

func (UnimplementedEntityStoreServer) Watch

type UnsafeEntityStoreServer

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

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

type UpdateEntityRequest

type UpdateEntityRequest struct {

	// Entity details
	Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
	// Used for optimistic locking.  If missing, the previous version will be replaced regardless
	PreviousVersion int64 `protobuf:"varint,2,opt,name=previous_version,json=previousVersion,proto3" json:"previous_version,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateEntityRequest) Descriptor deprecated

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

Deprecated: Use UpdateEntityRequest.ProtoReflect.Descriptor instead.

func (*UpdateEntityRequest) GetEntity

func (x *UpdateEntityRequest) GetEntity() *Entity

func (*UpdateEntityRequest) GetPreviousVersion

func (x *UpdateEntityRequest) GetPreviousVersion() int64

func (*UpdateEntityRequest) ProtoMessage

func (*UpdateEntityRequest) ProtoMessage()

func (*UpdateEntityRequest) ProtoReflect

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

func (*UpdateEntityRequest) Reset

func (x *UpdateEntityRequest) Reset()

func (*UpdateEntityRequest) String

func (x *UpdateEntityRequest) String() string

type UpdateEntityResponse

type UpdateEntityResponse struct {

	// Error info -- if exists, the save did not happen
	Error *EntityErrorInfo `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// Entity details
	Entity *Entity `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"`
	// Status code
	Status UpdateEntityResponse_Status `protobuf:"varint,3,opt,name=status,proto3,enum=entity.UpdateEntityResponse_Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateEntityResponse) Descriptor deprecated

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

Deprecated: Use UpdateEntityResponse.ProtoReflect.Descriptor instead.

func (*UpdateEntityResponse) GetEntity

func (x *UpdateEntityResponse) GetEntity() *Entity

func (*UpdateEntityResponse) GetError

func (x *UpdateEntityResponse) GetError() *EntityErrorInfo

func (*UpdateEntityResponse) GetStatus

func (*UpdateEntityResponse) ProtoMessage

func (*UpdateEntityResponse) ProtoMessage()

func (*UpdateEntityResponse) ProtoReflect

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

func (*UpdateEntityResponse) Reset

func (x *UpdateEntityResponse) Reset()

func (*UpdateEntityResponse) String

func (x *UpdateEntityResponse) String() string

type UpdateEntityResponse_Status

type UpdateEntityResponse_Status int32

Status enumeration

const (
	UpdateEntityResponse_ERROR     UpdateEntityResponse_Status = 0
	UpdateEntityResponse_UPDATED   UpdateEntityResponse_Status = 1
	UpdateEntityResponse_UNCHANGED UpdateEntityResponse_Status = 2
)

func (UpdateEntityResponse_Status) Descriptor

func (UpdateEntityResponse_Status) Enum

func (UpdateEntityResponse_Status) EnumDescriptor deprecated

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

Deprecated: Use UpdateEntityResponse_Status.Descriptor instead.

func (UpdateEntityResponse_Status) Number

func (UpdateEntityResponse_Status) String

func (UpdateEntityResponse_Status) Type

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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