sirenv1

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package sirenv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_gotocompany_siren_v1_siren_proto protoreflect.FileDescriptor
View Source
var SirenService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gotocompany.siren.v1.SirenService",
	HandlerType: (*SirenServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListSubscriptions",
			Handler:    _SirenService_ListSubscriptions_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gotocompany/siren/v1/siren.proto",
}

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

Functions

func RegisterSirenServiceHandler

func RegisterSirenServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSirenServiceHandler registers the http handlers for service SirenService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSirenServiceHandlerClient

func RegisterSirenServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SirenServiceClient) error

RegisterSirenServiceHandlerClient registers the http handlers for service SirenService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SirenServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SirenServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SirenServiceClient" to call the correct interceptors.

func RegisterSirenServiceHandlerFromEndpoint

func RegisterSirenServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSirenServiceHandlerFromEndpoint is same as RegisterSirenServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSirenServiceHandlerServer

func RegisterSirenServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SirenServiceServer) error

RegisterSirenServiceHandlerServer registers the http handlers for service SirenService to "mux". UnaryRPC :call SirenServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSirenServiceHandlerFromEndpoint instead.

func RegisterSirenServiceServer

func RegisterSirenServiceServer(s grpc.ServiceRegistrar, srv SirenServiceServer)

Types

type ListSubscriptionsRequest

type ListSubscriptionsRequest struct {
	NamespaceId                uint64            `protobuf:"varint,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"`
	Match                      map[string]string `` /* 151-byte string literal not displayed */
	NotificationMatch          map[string]string `` /* 200-byte string literal not displayed */
	SilenceId                  string            `protobuf:"bytes,4,opt,name=silence_id,json=silenceId,proto3" json:"silence_id,omitempty"`
	Metadata                   map[string]string `` /* 157-byte string literal not displayed */
	ReceiverId                 uint64            `protobuf:"varint,6,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
	SubscriptionReceiverLabels map[string]string `` /* 229-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ListSubscriptionsRequest) Descriptor deprecated

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

Deprecated: Use ListSubscriptionsRequest.ProtoReflect.Descriptor instead.

func (*ListSubscriptionsRequest) GetMatch

func (x *ListSubscriptionsRequest) GetMatch() map[string]string

func (*ListSubscriptionsRequest) GetMetadata

func (x *ListSubscriptionsRequest) GetMetadata() map[string]string

func (*ListSubscriptionsRequest) GetNamespaceId

func (x *ListSubscriptionsRequest) GetNamespaceId() uint64

func (*ListSubscriptionsRequest) GetNotificationMatch

func (x *ListSubscriptionsRequest) GetNotificationMatch() map[string]string

func (*ListSubscriptionsRequest) GetReceiverId

func (x *ListSubscriptionsRequest) GetReceiverId() uint64

func (*ListSubscriptionsRequest) GetSilenceId

func (x *ListSubscriptionsRequest) GetSilenceId() string

func (*ListSubscriptionsRequest) GetSubscriptionReceiverLabels

func (x *ListSubscriptionsRequest) GetSubscriptionReceiverLabels() map[string]string

func (*ListSubscriptionsRequest) ProtoMessage

func (*ListSubscriptionsRequest) ProtoMessage()

func (*ListSubscriptionsRequest) ProtoReflect

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

func (*ListSubscriptionsRequest) Reset

func (x *ListSubscriptionsRequest) Reset()

func (*ListSubscriptionsRequest) String

func (x *ListSubscriptionsRequest) String() string

func (*ListSubscriptionsRequest) Validate

func (m *ListSubscriptionsRequest) Validate() error

Validate checks the field values on ListSubscriptionsRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListSubscriptionsRequest) ValidateAll

func (m *ListSubscriptionsRequest) ValidateAll() error

ValidateAll checks the field values on ListSubscriptionsRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListSubscriptionsRequestMultiError, or nil if none found.

type ListSubscriptionsRequestMultiError

type ListSubscriptionsRequestMultiError []error

ListSubscriptionsRequestMultiError is an error wrapping multiple validation errors returned by ListSubscriptionsRequest.ValidateAll() if the designated constraints aren't met.

func (ListSubscriptionsRequestMultiError) AllErrors

func (m ListSubscriptionsRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListSubscriptionsRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ListSubscriptionsRequestValidationError

type ListSubscriptionsRequestValidationError struct {
	// contains filtered or unexported fields
}

ListSubscriptionsRequestValidationError is the validation error returned by ListSubscriptionsRequest.Validate if the designated constraints aren't met.

func (ListSubscriptionsRequestValidationError) Cause

Cause function returns cause value.

func (ListSubscriptionsRequestValidationError) Error

Error satisfies the builtin error interface

func (ListSubscriptionsRequestValidationError) ErrorName

ErrorName returns error name.

func (ListSubscriptionsRequestValidationError) Field

Field function returns field value.

func (ListSubscriptionsRequestValidationError) Key

Key function returns key value.

func (ListSubscriptionsRequestValidationError) Reason

Reason function returns reason value.

type ListSubscriptionsResponse

type ListSubscriptionsResponse struct {
	Subscriptions []*Subscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSubscriptionsResponse) Descriptor deprecated

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

Deprecated: Use ListSubscriptionsResponse.ProtoReflect.Descriptor instead.

func (*ListSubscriptionsResponse) GetSubscriptions

func (x *ListSubscriptionsResponse) GetSubscriptions() []*Subscription

func (*ListSubscriptionsResponse) ProtoMessage

func (*ListSubscriptionsResponse) ProtoMessage()

func (*ListSubscriptionsResponse) ProtoReflect

func (*ListSubscriptionsResponse) Reset

func (x *ListSubscriptionsResponse) Reset()

func (*ListSubscriptionsResponse) String

func (x *ListSubscriptionsResponse) String() string

func (*ListSubscriptionsResponse) Validate

func (m *ListSubscriptionsResponse) Validate() error

Validate checks the field values on ListSubscriptionsResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ListSubscriptionsResponse) ValidateAll

func (m *ListSubscriptionsResponse) ValidateAll() error

ValidateAll checks the field values on ListSubscriptionsResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListSubscriptionsResponseMultiError, or nil if none found.

type ListSubscriptionsResponseMultiError

type ListSubscriptionsResponseMultiError []error

ListSubscriptionsResponseMultiError is an error wrapping multiple validation errors returned by ListSubscriptionsResponse.ValidateAll() if the designated constraints aren't met.

func (ListSubscriptionsResponseMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (ListSubscriptionsResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ListSubscriptionsResponseValidationError

type ListSubscriptionsResponseValidationError struct {
	// contains filtered or unexported fields
}

ListSubscriptionsResponseValidationError is the validation error returned by ListSubscriptionsResponse.Validate if the designated constraints aren't met.

func (ListSubscriptionsResponseValidationError) Cause

Cause function returns cause value.

func (ListSubscriptionsResponseValidationError) Error

Error satisfies the builtin error interface

func (ListSubscriptionsResponseValidationError) ErrorName

ErrorName returns error name.

func (ListSubscriptionsResponseValidationError) Field

Field function returns field value.

func (ListSubscriptionsResponseValidationError) Key

Key function returns key value.

func (ListSubscriptionsResponseValidationError) Reason

Reason function returns reason value.

type SirenServiceClient

type SirenServiceClient interface {
	ListSubscriptions(ctx context.Context, in *ListSubscriptionsRequest, opts ...grpc.CallOption) (*ListSubscriptionsResponse, error)
}

SirenServiceClient is the client API for SirenService 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.

type SirenServiceServer

type SirenServiceServer interface {
	ListSubscriptions(context.Context, *ListSubscriptionsRequest) (*ListSubscriptionsResponse, error)
	// contains filtered or unexported methods
}

SirenServiceServer is the server API for SirenService service. All implementations must embed UnimplementedSirenServiceServer for forward compatibility

type Subscription

type Subscription struct {
	Id                uint64                          `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Urn               string                          `protobuf:"bytes,2,opt,name=urn,proto3" json:"urn,omitempty"`
	Namespace         uint64                          `protobuf:"varint,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
	ReceiversRelation []*SubscriptionReceiverRelation `protobuf:"bytes,4,rep,name=receivers_relation,json=receiversRelation,proto3" json:"receivers_relation,omitempty"`
	Match             map[string]string               `` /* 151-byte string literal not displayed */
	CreatedAt         *timestamppb.Timestamp          `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt         *timestamppb.Timestamp          `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	Metadata          *structpb.Struct                `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"`
	CreatedBy         string                          `protobuf:"bytes,9,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
	UpdatedBy         string                          `protobuf:"bytes,10,opt,name=updated_by,json=updatedBy,proto3" json:"updated_by,omitempty"`
	// contains filtered or unexported fields
}

func (*Subscription) Descriptor deprecated

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

Deprecated: Use Subscription.ProtoReflect.Descriptor instead.

func (*Subscription) GetCreatedAt

func (x *Subscription) GetCreatedAt() *timestamppb.Timestamp

func (*Subscription) GetCreatedBy

func (x *Subscription) GetCreatedBy() string

func (*Subscription) GetId

func (x *Subscription) GetId() uint64

func (*Subscription) GetMatch

func (x *Subscription) GetMatch() map[string]string

func (*Subscription) GetMetadata

func (x *Subscription) GetMetadata() *structpb.Struct

func (*Subscription) GetNamespace

func (x *Subscription) GetNamespace() uint64

func (*Subscription) GetReceiversRelation

func (x *Subscription) GetReceiversRelation() []*SubscriptionReceiverRelation

func (*Subscription) GetUpdatedAt

func (x *Subscription) GetUpdatedAt() *timestamppb.Timestamp

func (*Subscription) GetUpdatedBy

func (x *Subscription) GetUpdatedBy() string

func (*Subscription) GetUrn

func (x *Subscription) GetUrn() string

func (*Subscription) ProtoMessage

func (*Subscription) ProtoMessage()

func (*Subscription) ProtoReflect

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

func (*Subscription) Reset

func (x *Subscription) Reset()

func (*Subscription) String

func (x *Subscription) String() string

func (*Subscription) Validate

func (m *Subscription) Validate() error

Validate checks the field values on Subscription with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Subscription) ValidateAll

func (m *Subscription) ValidateAll() error

ValidateAll checks the field values on Subscription with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SubscriptionMultiError, or nil if none found.

type SubscriptionMultiError

type SubscriptionMultiError []error

SubscriptionMultiError is an error wrapping multiple validation errors returned by Subscription.ValidateAll() if the designated constraints aren't met.

func (SubscriptionMultiError) AllErrors

func (m SubscriptionMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SubscriptionMultiError) Error

func (m SubscriptionMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SubscriptionReceiverRelation

type SubscriptionReceiverRelation struct {
	SubscriptionId uint64                 `protobuf:"varint,1,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty"`
	ReceiverId     uint64                 `protobuf:"varint,2,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
	Labels         map[string]string      `` /* 153-byte string literal not displayed */
	CreatedAt      *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt      *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscriptionReceiverRelation) Descriptor deprecated

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

Deprecated: Use SubscriptionReceiverRelation.ProtoReflect.Descriptor instead.

func (*SubscriptionReceiverRelation) GetCreatedAt

func (*SubscriptionReceiverRelation) GetLabels

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

func (*SubscriptionReceiverRelation) GetReceiverId

func (x *SubscriptionReceiverRelation) GetReceiverId() uint64

func (*SubscriptionReceiverRelation) GetSubscriptionId

func (x *SubscriptionReceiverRelation) GetSubscriptionId() uint64

func (*SubscriptionReceiverRelation) GetUpdatedAt

func (*SubscriptionReceiverRelation) ProtoMessage

func (*SubscriptionReceiverRelation) ProtoMessage()

func (*SubscriptionReceiverRelation) ProtoReflect

func (*SubscriptionReceiverRelation) Reset

func (x *SubscriptionReceiverRelation) Reset()

func (*SubscriptionReceiverRelation) String

func (*SubscriptionReceiverRelation) Validate

func (m *SubscriptionReceiverRelation) Validate() error

Validate checks the field values on SubscriptionReceiverRelation with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SubscriptionReceiverRelation) ValidateAll

func (m *SubscriptionReceiverRelation) ValidateAll() error

ValidateAll checks the field values on SubscriptionReceiverRelation with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SubscriptionReceiverRelationMultiError, or nil if none found.

type SubscriptionReceiverRelationMultiError

type SubscriptionReceiverRelationMultiError []error

SubscriptionReceiverRelationMultiError is an error wrapping multiple validation errors returned by SubscriptionReceiverRelation.ValidateAll() if the designated constraints aren't met.

func (SubscriptionReceiverRelationMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (SubscriptionReceiverRelationMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type SubscriptionReceiverRelationValidationError

type SubscriptionReceiverRelationValidationError struct {
	// contains filtered or unexported fields
}

SubscriptionReceiverRelationValidationError is the validation error returned by SubscriptionReceiverRelation.Validate if the designated constraints aren't met.

func (SubscriptionReceiverRelationValidationError) Cause

Cause function returns cause value.

func (SubscriptionReceiverRelationValidationError) Error

Error satisfies the builtin error interface

func (SubscriptionReceiverRelationValidationError) ErrorName

ErrorName returns error name.

func (SubscriptionReceiverRelationValidationError) Field

Field function returns field value.

func (SubscriptionReceiverRelationValidationError) Key

Key function returns key value.

func (SubscriptionReceiverRelationValidationError) Reason

Reason function returns reason value.

type SubscriptionValidationError

type SubscriptionValidationError struct {
	// contains filtered or unexported fields
}

SubscriptionValidationError is the validation error returned by Subscription.Validate if the designated constraints aren't met.

func (SubscriptionValidationError) Cause

Cause function returns cause value.

func (SubscriptionValidationError) Error

Error satisfies the builtin error interface

func (SubscriptionValidationError) ErrorName

func (e SubscriptionValidationError) ErrorName() string

ErrorName returns error name.

func (SubscriptionValidationError) Field

Field function returns field value.

func (SubscriptionValidationError) Key

Key function returns key value.

func (SubscriptionValidationError) Reason

Reason function returns reason value.

type UnimplementedSirenServiceServer

type UnimplementedSirenServiceServer struct {
}

UnimplementedSirenServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSirenServiceServer) ListSubscriptions

type UnsafeSirenServiceServer

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

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

Jump to

Keyboard shortcuts

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