proto

package
v1.1.58 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Owner_Type_name = map[int32]string{
		0: "TEAM",
	}
	Owner_Type_value = map[string]int32{
		"TEAM": 0,
	}
)

Enum value maps for Owner_Type.

View Source
var (
	Reference_Type_name = map[int32]string{
		0: "SOFT",
		1: "HARD",
	}
	Reference_Type_value = map[string]int32{
		"SOFT": 0,
		"HARD": 1,
	}
)

Enum value maps for Reference_Type.

View Source
var (
	Event_Type_name = map[int32]string{
		0: "CREATED",
		1: "UPDATED",
		2: "DELETED",
		3: "SUBRESOURCEUPDATED",
	}
	Event_Type_value = map[string]int32{
		"CREATED":            0,
		"UPDATED":            1,
		"DELETED":            2,
		"SUBRESOURCEUPDATED": 3,
	}
)

Enum value maps for Event_Type.

View Source
var File_apicentral_proto protoreflect.FileDescriptor
View Source
var File_watch_proto protoreflect.FileDescriptor
View Source
var Watch_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "central.events.v1.watch",
	HandlerType: (*WatchServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "subscribe",
			Handler:       _Watch_Subscribe_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "watch.proto",
}

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

Functions

func RegisterWatchServer

func RegisterWatchServer(s grpc.ServiceRegistrar, srv WatchServer)

Types

type Event

type Event struct {
	Id            string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Time          string            `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	Version       string            `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	Product       string            `protobuf:"bytes,4,opt,name=product,proto3" json:"product,omitempty"`
	CorrelationId string            `protobuf:"bytes,5,opt,name=correlationId,proto3" json:"correlationId,omitempty"`
	Organization  *Organization     `protobuf:"bytes,6,opt,name=organization,proto3" json:"organization,omitempty"`
	Type          Event_Type        `protobuf:"varint,7,opt,name=type,proto3,enum=central.events.v1.Event_Type" json:"type,omitempty"`
	Payload       *ResourceInstance `protobuf:"bytes,8,opt,name=payload,proto3" json:"payload,omitempty"`
	Metadata      *EventMeta        `protobuf:"bytes,9,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetCorrelationId

func (x *Event) GetCorrelationId() string

func (*Event) GetId

func (x *Event) GetId() string

func (*Event) GetMetadata

func (x *Event) GetMetadata() *EventMeta

func (*Event) GetOrganization

func (x *Event) GetOrganization() *Organization

func (*Event) GetPayload

func (x *Event) GetPayload() *ResourceInstance

func (*Event) GetProduct

func (x *Event) GetProduct() string

func (*Event) GetTime

func (x *Event) GetTime() string

func (*Event) GetType

func (x *Event) GetType() Event_Type

func (*Event) GetVersion

func (x *Event) GetVersion() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type EventMeta

type EventMeta struct {
	WatchTopicID       string `protobuf:"bytes,1,opt,name=watchTopicID,proto3" json:"watchTopicID,omitempty"`
	WatchTopicSelfLink string `protobuf:"bytes,2,opt,name=watchTopicSelfLink,proto3" json:"watchTopicSelfLink,omitempty"`
	SequenceID         int64  `protobuf:"varint,3,opt,name=sequenceID,proto3" json:"sequenceID,omitempty"`
	Subresource        string `protobuf:"bytes,4,opt,name=subresource,proto3" json:"subresource,omitempty"`
	// contains filtered or unexported fields
}

func (*EventMeta) Descriptor deprecated

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

Deprecated: Use EventMeta.ProtoReflect.Descriptor instead.

func (*EventMeta) GetSequenceID

func (x *EventMeta) GetSequenceID() int64

func (*EventMeta) GetSubresource

func (x *EventMeta) GetSubresource() string

func (*EventMeta) GetWatchTopicID

func (x *EventMeta) GetWatchTopicID() string
func (x *EventMeta) GetWatchTopicSelfLink() string

func (*EventMeta) ProtoMessage

func (*EventMeta) ProtoMessage()

func (*EventMeta) ProtoReflect

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

func (*EventMeta) Reset

func (x *EventMeta) Reset()

func (*EventMeta) String

func (x *EventMeta) String() string

type Event_Type

type Event_Type int32
const (
	Event_CREATED            Event_Type = 0
	Event_UPDATED            Event_Type = 1
	Event_DELETED            Event_Type = 2
	Event_SUBRESOURCEUPDATED Event_Type = 3
)

func (Event_Type) Descriptor

func (Event_Type) Descriptor() protoreflect.EnumDescriptor

func (Event_Type) Enum

func (x Event_Type) Enum() *Event_Type

func (Event_Type) EnumDescriptor deprecated

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

Deprecated: Use Event_Type.Descriptor instead.

func (Event_Type) Number

func (x Event_Type) Number() protoreflect.EnumNumber

func (Event_Type) String

func (x Event_Type) String() string

func (Event_Type) Type

type Metadata

type Metadata struct {

	// Internal id of the resource.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The scope where this resource was defined.
	Scope *Metadata_ScopeKind `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"`
	// The URL representing this resource object.
	SelfLink string `protobuf:"bytes,6,opt,name=selfLink,proto3" json:"selfLink,omitempty"`
	// resource references
	References []*Reference `protobuf:"bytes,7,rep,name=references,proto3" json:"references,omitempty"`
	// contains filtered or unexported fields
}

Metadata that all server resources have. Data is generated by the server.

func (*Metadata) Descriptor deprecated

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetId

func (x *Metadata) GetId() string

func (*Metadata) GetReferences

func (x *Metadata) GetReferences() []*Reference

func (*Metadata) GetScope

func (x *Metadata) GetScope() *Metadata_ScopeKind
func (x *Metadata) GetSelfLink() string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

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

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type Metadata_ScopeKind

type Metadata_ScopeKind struct {

	// Internal id of the scope resource where the resource is defined.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The kind of the scope resource where the resource is defined.
	Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
	// The name of the scope where the resource is defined.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// The URL to access the scope resource.
	SelfLink string `protobuf:"bytes,4,opt,name=selfLink,proto3" json:"selfLink,omitempty"`
	// contains filtered or unexported fields
}

func (*Metadata_ScopeKind) Descriptor deprecated

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

Deprecated: Use Metadata_ScopeKind.ProtoReflect.Descriptor instead.

func (*Metadata_ScopeKind) GetId

func (x *Metadata_ScopeKind) GetId() string

func (*Metadata_ScopeKind) GetKind

func (x *Metadata_ScopeKind) GetKind() string

func (*Metadata_ScopeKind) GetName

func (x *Metadata_ScopeKind) GetName() string
func (x *Metadata_ScopeKind) GetSelfLink() string

func (*Metadata_ScopeKind) ProtoMessage

func (*Metadata_ScopeKind) ProtoMessage()

func (*Metadata_ScopeKind) ProtoReflect

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

func (*Metadata_ScopeKind) Reset

func (x *Metadata_ScopeKind) Reset()

func (*Metadata_ScopeKind) String

func (x *Metadata_ScopeKind) String() string

type Organization

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

func (*Organization) Descriptor deprecated

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

Deprecated: Use Organization.ProtoReflect.Descriptor instead.

func (*Organization) GetId

func (x *Organization) GetId() string

func (*Organization) ProtoMessage

func (*Organization) ProtoMessage()

func (*Organization) ProtoReflect

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

func (*Organization) Reset

func (x *Organization) Reset()

func (*Organization) String

func (x *Organization) String() string

type Owner

type Owner struct {

	// Id of the owner of the resource.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The type of the owner. Defaults to team if not present.
	Type Owner_Type `protobuf:"varint,2,opt,name=type,proto3,enum=central.events.v1.datamodel.Owner_Type" json:"type,omitempty"`
	// contains filtered or unexported fields
}

Owner of the resource.

func (*Owner) Descriptor deprecated

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

Deprecated: Use Owner.ProtoReflect.Descriptor instead.

func (*Owner) GetId

func (x *Owner) GetId() string

func (*Owner) GetType

func (x *Owner) GetType() Owner_Type

func (*Owner) ProtoMessage

func (*Owner) ProtoMessage()

func (*Owner) ProtoReflect

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

func (*Owner) Reset

func (x *Owner) Reset()

func (*Owner) String

func (x *Owner) String() string

type Owner_Type

type Owner_Type int32
const (
	Owner_TEAM Owner_Type = 0
)

func (Owner_Type) Descriptor

func (Owner_Type) Descriptor() protoreflect.EnumDescriptor

func (Owner_Type) Enum

func (x Owner_Type) Enum() *Owner_Type

func (Owner_Type) EnumDescriptor deprecated

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

Deprecated: Use Owner_Type.Descriptor instead.

func (Owner_Type) Number

func (x Owner_Type) Number() protoreflect.EnumNumber

func (Owner_Type) String

func (x Owner_Type) String() string

func (Owner_Type) Type

type Reference

type Reference struct {

	// Unique id generated by the server.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The kind of the referenced resource.
	Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
	// The name of the referenced resource.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// The kind of the referenced resource scope.
	ScopeKind string `protobuf:"bytes,4,opt,name=scopeKind,proto3" json:"scopeKind,omitempty"`
	// The name of the referenced resource scope.
	ScopeName string `protobuf:"bytes,5,opt,name=scopeName,proto3" json:"scopeName,omitempty"`
	// The URL representing the referenced resource.
	SelfLink string `protobuf:"bytes,6,opt,name=selfLink,proto3" json:"selfLink,omitempty"`
	// Defines the type of the reference: * soft - spec property that has this reference will get nulled out if the referenced resource gets removed. * hard - dictates that the current resource will get removed when the referenced resource gets removed.
	Type Reference_Type `protobuf:"varint,7,opt,name=type,proto3,enum=central.events.v1.datamodel.Reference_Type" json:"type,omitempty"`
	// contains filtered or unexported fields
}

Reference resource

func (*Reference) Descriptor deprecated

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

Deprecated: Use Reference.ProtoReflect.Descriptor instead.

func (*Reference) GetId

func (x *Reference) GetId() string

func (*Reference) GetKind

func (x *Reference) GetKind() string

func (*Reference) GetName

func (x *Reference) GetName() string

func (*Reference) GetScopeKind

func (x *Reference) GetScopeKind() string

func (*Reference) GetScopeName

func (x *Reference) GetScopeName() string
func (x *Reference) GetSelfLink() string

func (*Reference) GetType

func (x *Reference) GetType() Reference_Type

func (*Reference) ProtoMessage

func (*Reference) ProtoMessage()

func (*Reference) ProtoReflect

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

func (*Reference) Reset

func (x *Reference) Reset()

func (*Reference) String

func (x *Reference) String() string

type Reference_Type

type Reference_Type int32
const (
	Reference_SOFT Reference_Type = 0
	Reference_HARD Reference_Type = 1
)

func (Reference_Type) Descriptor

func (Reference_Type) Enum

func (x Reference_Type) Enum() *Reference_Type

func (Reference_Type) EnumDescriptor deprecated

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

Deprecated: Use Reference_Type.Descriptor instead.

func (Reference_Type) Number

func (Reference_Type) String

func (x Reference_Type) String() string

func (Reference_Type) Type

type Request

type Request struct {
	SelfLink string `protobuf:"bytes,1,opt,name=selfLink,proto3" json:"selfLink,omitempty"`
	Token    string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (x *Request) GetSelfLink() string

func (*Request) GetToken

func (x *Request) GetToken() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type ResourceInstance

type ResourceInstance struct {

	// Defines the group from which the resource belongs to. The server infers this from the endpoint the client submits the request to.
	Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	// Resource kind
	Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
	// Name of the resource
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// Metadata.
	Metadata   *Metadata         `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Attributes map[string]string `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

API Server generic resource structure.

func (*ResourceInstance) Descriptor deprecated

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

Deprecated: Use ResourceInstance.ProtoReflect.Descriptor instead.

func (*ResourceInstance) GetAttributes

func (x *ResourceInstance) GetAttributes() map[string]string

func (*ResourceInstance) GetGroup

func (x *ResourceInstance) GetGroup() string

func (*ResourceInstance) GetKind

func (x *ResourceInstance) GetKind() string

func (*ResourceInstance) GetMetadata

func (x *ResourceInstance) GetMetadata() *Metadata

func (*ResourceInstance) GetName

func (x *ResourceInstance) GetName() string

func (*ResourceInstance) ProtoMessage

func (*ResourceInstance) ProtoMessage()

func (*ResourceInstance) ProtoReflect

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

func (*ResourceInstance) Reset

func (x *ResourceInstance) Reset()

func (*ResourceInstance) String

func (x *ResourceInstance) String() string

type UnimplementedWatchServer

type UnimplementedWatchServer struct {
}

UnimplementedWatchServer must be embedded to have forward compatible implementations.

func (UnimplementedWatchServer) Subscribe

type UnsafeWatchServer

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

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

type WatchClient

type WatchClient interface {
	Subscribe(ctx context.Context, opts ...grpc.CallOption) (Watch_SubscribeClient, error)
}

WatchClient is the client API for Watch 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 NewWatchClient

func NewWatchClient(cc grpc.ClientConnInterface) WatchClient

type WatchServer

type WatchServer interface {
	Subscribe(Watch_SubscribeServer) error
	// contains filtered or unexported methods
}

WatchServer is the server API for Watch service. All implementations must embed UnimplementedWatchServer for forward compatibility

type Watch_SubscribeClient

type Watch_SubscribeClient interface {
	Send(*Request) error
	Recv() (*Event, error)
	grpc.ClientStream
}

type Watch_SubscribeServer

type Watch_SubscribeServer interface {
	Send(*Event) error
	Recv() (*Request, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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