Documentation ¶
Index ¶
- Variables
- func RegisterWatchServer(s grpc.ServiceRegistrar, srv WatchServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetCorrelationId() string
- func (x *Event) GetId() string
- func (x *Event) GetMetadata() *EventMeta
- func (x *Event) GetOrganization() *Organization
- func (x *Event) GetPayload() *ResourceInstance
- func (x *Event) GetProduct() string
- func (x *Event) GetTime() string
- func (x *Event) GetType() Event_Type
- func (x *Event) GetVersion() string
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type EventMeta
- func (*EventMeta) Descriptor() ([]byte, []int)deprecated
- func (x *EventMeta) GetSequenceID() int64
- func (x *EventMeta) GetSubresource() string
- func (x *EventMeta) GetWatchTopicID() string
- func (x *EventMeta) GetWatchTopicSelfLink() string
- func (*EventMeta) ProtoMessage()
- func (x *EventMeta) ProtoReflect() protoreflect.Message
- func (x *EventMeta) Reset()
- func (x *EventMeta) String() string
- type Event_Type
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *Metadata) GetId() string
- func (x *Metadata) GetReferences() []*Reference
- func (x *Metadata) GetScope() *Metadata_ScopeKind
- func (x *Metadata) GetSelfLink() string
- func (*Metadata) ProtoMessage()
- func (x *Metadata) ProtoReflect() protoreflect.Message
- func (x *Metadata) Reset()
- func (x *Metadata) String() string
- type Metadata_ScopeKind
- func (*Metadata_ScopeKind) Descriptor() ([]byte, []int)deprecated
- func (x *Metadata_ScopeKind) GetId() string
- func (x *Metadata_ScopeKind) GetKind() string
- func (x *Metadata_ScopeKind) GetName() string
- func (x *Metadata_ScopeKind) GetSelfLink() string
- func (*Metadata_ScopeKind) ProtoMessage()
- func (x *Metadata_ScopeKind) ProtoReflect() protoreflect.Message
- func (x *Metadata_ScopeKind) Reset()
- func (x *Metadata_ScopeKind) String() string
- type Organization
- type Owner
- type Owner_Type
- type Reference
- func (*Reference) Descriptor() ([]byte, []int)deprecated
- func (x *Reference) GetId() string
- func (x *Reference) GetKind() string
- func (x *Reference) GetName() string
- func (x *Reference) GetScopeKind() string
- func (x *Reference) GetScopeName() string
- func (x *Reference) GetSelfLink() string
- func (x *Reference) GetType() Reference_Type
- func (*Reference) ProtoMessage()
- func (x *Reference) ProtoReflect() protoreflect.Message
- func (x *Reference) Reset()
- func (x *Reference) String() string
- type Reference_Type
- func (Reference_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Reference_Type) Enum() *Reference_Type
- func (Reference_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Reference_Type) Number() protoreflect.EnumNumber
- func (x Reference_Type) String() string
- func (Reference_Type) Type() protoreflect.EnumType
- type Request
- type ResourceInstance
- func (*ResourceInstance) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceInstance) GetAttributes() map[string]string
- func (x *ResourceInstance) GetGroup() string
- func (x *ResourceInstance) GetKind() string
- func (x *ResourceInstance) GetMetadata() *Metadata
- func (x *ResourceInstance) GetName() string
- func (*ResourceInstance) ProtoMessage()
- func (x *ResourceInstance) ProtoReflect() protoreflect.Message
- func (x *ResourceInstance) Reset()
- func (x *ResourceInstance) String() string
- type UnimplementedWatchServer
- type UnsafeWatchServer
- type WatchClient
- type WatchServer
- type Watch_SubscribeClient
- type Watch_SubscribeServer
Constants ¶
This section is empty.
Variables ¶
var ( Owner_Type_name = map[int32]string{ 0: "TEAM", } Owner_Type_value = map[string]int32{ "TEAM": 0, } )
Enum value maps for Owner_Type.
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.
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.
var File_apicentral_proto protoreflect.FileDescriptor
var File_watch_proto protoreflect.FileDescriptor
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) GetCorrelationId ¶
func (*Event) GetMetadata ¶
func (*Event) GetOrganization ¶
func (x *Event) GetOrganization() *Organization
func (*Event) GetPayload ¶
func (x *Event) GetPayload() *ResourceInstance
func (*Event) GetProduct ¶
func (*Event) GetType ¶
func (x *Event) GetType() Event_Type
func (*Event) GetVersion ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
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) GetSequenceID ¶
func (*EventMeta) GetSubresource ¶
func (*EventMeta) GetWatchTopicID ¶
func (*EventMeta) GetWatchTopicSelfLink ¶
func (*EventMeta) ProtoMessage ¶
func (*EventMeta) ProtoMessage()
func (*EventMeta) ProtoReflect ¶
func (x *EventMeta) ProtoReflect() protoreflect.Message
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 ¶
func (Event_Type) Type() protoreflect.EnumType
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) GetReferences ¶
func (*Metadata) GetScope ¶
func (x *Metadata) GetScope() *Metadata_ScopeKind
func (*Metadata) GetSelfLink ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
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 (*Metadata_ScopeKind) GetSelfLink ¶
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) GetType ¶
func (x *Owner) GetType() Owner_Type
func (*Owner) ProtoMessage ¶
func (*Owner) ProtoMessage()
func (*Owner) ProtoReflect ¶
func (x *Owner) ProtoReflect() protoreflect.Message
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 ¶
func (Owner_Type) Type() protoreflect.EnumType
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) GetScopeKind ¶
func (*Reference) GetScopeName ¶
func (*Reference) GetSelfLink ¶
func (*Reference) GetType ¶
func (x *Reference) GetType() Reference_Type
func (*Reference) ProtoMessage ¶
func (*Reference) ProtoMessage()
func (*Reference) ProtoReflect ¶
func (x *Reference) ProtoReflect() protoreflect.Message
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) Descriptor() protoreflect.EnumDescriptor
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 (x Reference_Type) Number() protoreflect.EnumNumber
func (Reference_Type) String ¶
func (x Reference_Type) String() string
func (Reference_Type) Type ¶
func (Reference_Type) Type() protoreflect.EnumType
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) GetSelfLink ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
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 ¶
func (UnimplementedWatchServer) Subscribe(Watch_SubscribeServer) error
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