Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterNotificationChannelServiceServer(s grpc.ServiceRegistrar, srv NotificationChannelServiceServer)
- func RegisterPluginServiceServer(s grpc.ServiceRegistrar, srv PluginServiceServer)
- type DescribeRequest
- func (*DescribeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeRequest) GetHostContractVersions() []uint32
- func (*DescribeRequest) ProtoMessage()
- func (x *DescribeRequest) ProtoReflect() protoreflect.Message
- func (x *DescribeRequest) Reset()
- func (x *DescribeRequest) String() string
- type DescribeResponse
- func (*DescribeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeResponse) GetConfigSchema() string
- func (x *DescribeResponse) GetContractVersion() uint32
- func (x *DescribeResponse) GetKind() string
- func (x *DescribeResponse) GetName() string
- func (x *DescribeResponse) GetRequestedAbilities() []string
- func (x *DescribeResponse) GetVersion() string
- func (*DescribeResponse) ProtoMessage()
- func (x *DescribeResponse) ProtoReflect() protoreflect.Message
- func (x *DescribeResponse) Reset()
- func (x *DescribeResponse) String() string
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetBody() string
- func (x *Event) GetId() string
- func (x *Event) GetLink() string
- func (x *Event) GetOccurredAt() *timestamppb.Timestamp
- func (x *Event) GetResourceId() string
- func (x *Event) GetSeverity() string
- func (x *Event) GetStatus() string
- func (x *Event) GetTitle() string
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type HealthRequest
- type HealthResponse
- func (*HealthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HealthResponse) GetDetail() string
- func (x *HealthResponse) GetOk() bool
- func (*HealthResponse) ProtoMessage()
- func (x *HealthResponse) ProtoReflect() protoreflect.Message
- func (x *HealthResponse) Reset()
- func (x *HealthResponse) String() string
- type NotificationChannelServiceClient
- type NotificationChannelServiceServer
- type PluginServiceClient
- type PluginServiceServer
- type SendRequest
- func (*SendRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendRequest) GetConfigJson() string
- func (x *SendRequest) GetEvent() *Event
- func (x *SendRequest) GetSecret() string
- func (*SendRequest) ProtoMessage()
- func (x *SendRequest) ProtoReflect() protoreflect.Message
- func (x *SendRequest) Reset()
- func (x *SendRequest) String() string
- type SendResponse
- func (*SendResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SendResponse) GetDelivered() bool
- func (x *SendResponse) GetDetail() string
- func (x *SendResponse) GetRetryable() bool
- func (*SendResponse) ProtoMessage()
- func (x *SendResponse) ProtoReflect() protoreflect.Message
- func (x *SendResponse) Reset()
- func (x *SendResponse) String() string
- type UnimplementedNotificationChannelServiceServer
- type UnimplementedPluginServiceServer
- type UnsafeNotificationChannelServiceServer
- type UnsafePluginServiceServer
Constants ¶
const ( PluginService_Describe_FullMethodName = "/levelrail.plugin.v1.PluginService/Describe" PluginService_Health_FullMethodName = "/levelrail.plugin.v1.PluginService/Health" )
const (
NotificationChannelService_Send_FullMethodName = "/levelrail.plugin.v1.NotificationChannelService/Send"
)
Variables ¶
var File_proto_plugin_v1_plugin_proto protoreflect.FileDescriptor
var NotificationChannelService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "levelrail.plugin.v1.NotificationChannelService", HandlerType: (*NotificationChannelServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Send", Handler: _NotificationChannelService_Send_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/plugin/v1/plugin.proto", }
NotificationChannelService_ServiceDesc is the grpc.ServiceDesc for NotificationChannelService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var PluginService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "levelrail.plugin.v1.PluginService", HandlerType: (*PluginServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Describe", Handler: _PluginService_Describe_Handler, }, { MethodName: "Health", Handler: _PluginService_Health_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/plugin/v1/plugin.proto", }
PluginService_ServiceDesc is the grpc.ServiceDesc for PluginService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNotificationChannelServiceServer ¶
func RegisterNotificationChannelServiceServer(s grpc.ServiceRegistrar, srv NotificationChannelServiceServer)
func RegisterPluginServiceServer ¶
func RegisterPluginServiceServer(s grpc.ServiceRegistrar, srv PluginServiceServer)
Types ¶
type DescribeRequest ¶
type DescribeRequest struct {
HostContractVersions []uint32 `` /* 131-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*DescribeRequest) Descriptor
deprecated
func (*DescribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead.
func (*DescribeRequest) GetHostContractVersions ¶
func (x *DescribeRequest) GetHostContractVersions() []uint32
func (*DescribeRequest) ProtoMessage ¶
func (*DescribeRequest) ProtoMessage()
func (*DescribeRequest) ProtoReflect ¶
func (x *DescribeRequest) ProtoReflect() protoreflect.Message
func (*DescribeRequest) Reset ¶
func (x *DescribeRequest) Reset()
func (*DescribeRequest) String ¶
func (x *DescribeRequest) String() string
type DescribeResponse ¶
type DescribeResponse struct {
ContractVersion uint32 `protobuf:"varint,1,opt,name=contract_version,json=contractVersion,proto3" json:"contract_version,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
// Extension kind, for example "notification_channel".
Kind string `protobuf:"bytes,4,opt,name=kind,proto3" json:"kind,omitempty"`
// Abilities the plugin asks for, in the platform ability vocabulary.
RequestedAbilities []string `protobuf:"bytes,5,rep,name=requested_abilities,json=requestedAbilities,proto3" json:"requested_abilities,omitempty"`
// JSON Schema (as text) for the plugin's own non-secret config.
ConfigSchema string `protobuf:"bytes,6,opt,name=config_schema,json=configSchema,proto3" json:"config_schema,omitempty"`
// contains filtered or unexported fields
}
func (*DescribeResponse) Descriptor
deprecated
func (*DescribeResponse) Descriptor() ([]byte, []int)
Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead.
func (*DescribeResponse) GetConfigSchema ¶
func (x *DescribeResponse) GetConfigSchema() string
func (*DescribeResponse) GetContractVersion ¶
func (x *DescribeResponse) GetContractVersion() uint32
func (*DescribeResponse) GetKind ¶
func (x *DescribeResponse) GetKind() string
func (*DescribeResponse) GetName ¶
func (x *DescribeResponse) GetName() string
func (*DescribeResponse) GetRequestedAbilities ¶
func (x *DescribeResponse) GetRequestedAbilities() []string
func (*DescribeResponse) GetVersion ¶
func (x *DescribeResponse) GetVersion() string
func (*DescribeResponse) ProtoMessage ¶
func (*DescribeResponse) ProtoMessage()
func (*DescribeResponse) ProtoReflect ¶
func (x *DescribeResponse) ProtoReflect() protoreflect.Message
func (*DescribeResponse) Reset ¶
func (x *DescribeResponse) Reset()
func (*DescribeResponse) String ¶
func (x *DescribeResponse) String() string
type Event ¶
type Event struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
// "firing" or "resolved".
Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
Severity string `protobuf:"bytes,5,opt,name=severity,proto3" json:"severity,omitempty"`
ResourceId string `protobuf:"bytes,6,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
Link string `protobuf:"bytes,7,opt,name=link,proto3" json:"link,omitempty"`
OccurredAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=occurred_at,json=occurredAt,proto3" json:"occurred_at,omitempty"`
// contains filtered or unexported fields
}
func (*Event) Descriptor
deprecated
func (*Event) GetOccurredAt ¶
func (x *Event) GetOccurredAt() *timestamppb.Timestamp
func (*Event) GetResourceId ¶
func (*Event) GetSeverity ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type HealthRequest ¶
type HealthRequest struct {
// contains filtered or unexported fields
}
func (*HealthRequest) Descriptor
deprecated
func (*HealthRequest) Descriptor() ([]byte, []int)
Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead.
func (*HealthRequest) ProtoMessage ¶
func (*HealthRequest) ProtoMessage()
func (*HealthRequest) ProtoReflect ¶
func (x *HealthRequest) ProtoReflect() protoreflect.Message
func (*HealthRequest) Reset ¶
func (x *HealthRequest) Reset()
func (*HealthRequest) String ¶
func (x *HealthRequest) String() string
type HealthResponse ¶
type HealthResponse struct {
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"`
// contains filtered or unexported fields
}
func (*HealthResponse) Descriptor
deprecated
func (*HealthResponse) Descriptor() ([]byte, []int)
Deprecated: Use HealthResponse.ProtoReflect.Descriptor instead.
func (*HealthResponse) GetDetail ¶
func (x *HealthResponse) GetDetail() string
func (*HealthResponse) GetOk ¶
func (x *HealthResponse) GetOk() bool
func (*HealthResponse) ProtoMessage ¶
func (*HealthResponse) ProtoMessage()
func (*HealthResponse) ProtoReflect ¶
func (x *HealthResponse) ProtoReflect() protoreflect.Message
func (*HealthResponse) Reset ¶
func (x *HealthResponse) Reset()
func (*HealthResponse) String ¶
func (x *HealthResponse) String() string
type NotificationChannelServiceClient ¶
type NotificationChannelServiceClient interface {
Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendResponse, error)
}
NotificationChannelServiceClient is the client API for NotificationChannelService 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.
NotificationChannelService is served by plugins whose kind is notification_channel.
func NewNotificationChannelServiceClient ¶
func NewNotificationChannelServiceClient(cc grpc.ClientConnInterface) NotificationChannelServiceClient
type NotificationChannelServiceServer ¶
type NotificationChannelServiceServer interface {
Send(context.Context, *SendRequest) (*SendResponse, error)
// contains filtered or unexported methods
}
NotificationChannelServiceServer is the server API for NotificationChannelService service. All implementations must embed UnimplementedNotificationChannelServiceServer for forward compatibility.
NotificationChannelService is served by plugins whose kind is notification_channel.
type PluginServiceClient ¶
type PluginServiceClient interface {
// Describe is the first call. The host offers the contract versions it
// speaks; the plugin answers with the one it will use or an error.
Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error)
Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error)
}
PluginServiceClient is the client API for PluginService 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.
PluginService is served by every plugin whatever kinds it implements.
func NewPluginServiceClient ¶
func NewPluginServiceClient(cc grpc.ClientConnInterface) PluginServiceClient
type PluginServiceServer ¶
type PluginServiceServer interface {
// Describe is the first call. The host offers the contract versions it
// speaks; the plugin answers with the one it will use or an error.
Describe(context.Context, *DescribeRequest) (*DescribeResponse, error)
Health(context.Context, *HealthRequest) (*HealthResponse, error)
// contains filtered or unexported methods
}
PluginServiceServer is the server API for PluginService service. All implementations must embed UnimplementedPluginServiceServer for forward compatibility.
PluginService is served by every plugin whatever kinds it implements.
type SendRequest ¶
type SendRequest struct {
Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
// The plugin's own non-secret config (JSON), stored at install.
ConfigJson string `protobuf:"bytes,2,opt,name=config_json,json=configJson,proto3" json:"config_json,omitempty"`
// The credential for this one call (for example a token or webhook URL).
// It must not be persisted or logged by the plugin.
Secret string `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"`
// contains filtered or unexported fields
}
func (*SendRequest) Descriptor
deprecated
func (*SendRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.
func (*SendRequest) GetConfigJson ¶
func (x *SendRequest) GetConfigJson() string
func (*SendRequest) GetEvent ¶
func (x *SendRequest) GetEvent() *Event
func (*SendRequest) GetSecret ¶
func (x *SendRequest) GetSecret() string
func (*SendRequest) ProtoMessage ¶
func (*SendRequest) ProtoMessage()
func (*SendRequest) ProtoReflect ¶
func (x *SendRequest) ProtoReflect() protoreflect.Message
func (*SendRequest) Reset ¶
func (x *SendRequest) Reset()
func (*SendRequest) String ¶
func (x *SendRequest) String() string
type SendResponse ¶
type SendResponse struct {
Delivered bool `protobuf:"varint,1,opt,name=delivered,proto3" json:"delivered,omitempty"`
Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"`
Retryable bool `protobuf:"varint,3,opt,name=retryable,proto3" json:"retryable,omitempty"`
// contains filtered or unexported fields
}
func (*SendResponse) Descriptor
deprecated
func (*SendResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendResponse.ProtoReflect.Descriptor instead.
func (*SendResponse) GetDelivered ¶
func (x *SendResponse) GetDelivered() bool
func (*SendResponse) GetDetail ¶
func (x *SendResponse) GetDetail() string
func (*SendResponse) GetRetryable ¶
func (x *SendResponse) GetRetryable() bool
func (*SendResponse) ProtoMessage ¶
func (*SendResponse) ProtoMessage()
func (*SendResponse) ProtoReflect ¶
func (x *SendResponse) ProtoReflect() protoreflect.Message
func (*SendResponse) Reset ¶
func (x *SendResponse) Reset()
func (*SendResponse) String ¶
func (x *SendResponse) String() string
type UnimplementedNotificationChannelServiceServer ¶
type UnimplementedNotificationChannelServiceServer struct{}
UnimplementedNotificationChannelServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedNotificationChannelServiceServer) Send ¶
func (UnimplementedNotificationChannelServiceServer) Send(context.Context, *SendRequest) (*SendResponse, error)
type UnimplementedPluginServiceServer ¶
type UnimplementedPluginServiceServer struct{}
UnimplementedPluginServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedPluginServiceServer) Describe ¶
func (UnimplementedPluginServiceServer) Describe(context.Context, *DescribeRequest) (*DescribeResponse, error)
func (UnimplementedPluginServiceServer) Health ¶
func (UnimplementedPluginServiceServer) Health(context.Context, *HealthRequest) (*HealthResponse, error)
type UnsafeNotificationChannelServiceServer ¶
type UnsafeNotificationChannelServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNotificationChannelServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NotificationChannelServiceServer will result in compilation errors.
type UnsafePluginServiceServer ¶
type UnsafePluginServiceServer interface {
// contains filtered or unexported methods
}
UnsafePluginServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServiceServer will result in compilation errors.