testv1

package
v0.0.0-...-e933104 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package testv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	TestService_ListInvitations_FullMethodName     = "/io.akuity.test.v1.TestService/ListInvitations"
	TestService_SendInvitation_FullMethodName      = "/io.akuity.test.v1.TestService/SendInvitation"
	TestService_TrackInvitation_FullMethodName     = "/io.akuity.test.v1.TestService/TrackInvitation"
	TestService_DownloadInvitations_FullMethodName = "/io.akuity.test.v1.TestService/DownloadInvitations"
)

Variables

View Source
var (
	EventType_name = map[int32]string{
		0: "EVENT_TYPE_UNDEFINED",
		1: "EVENT_TYPE_SEEN",
		2: "EVENT_TYPE_ACCEPTED",
		3: "EVENT_TYPE_REJECTED",
	}
	EventType_value = map[string]int32{
		"EVENT_TYPE_UNDEFINED": 0,
		"EVENT_TYPE_SEEN":      1,
		"EVENT_TYPE_ACCEPTED":  2,
		"EVENT_TYPE_REJECTED":  3,
	}
)

Enum value maps for EventType.

View Source
var File_testv1_test_proto protoreflect.FileDescriptor
View Source
var TestService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "io.akuity.test.v1.TestService",
	HandlerType: (*TestServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListInvitations",
			Handler:    _TestService_ListInvitations_Handler,
		},
		{
			MethodName: "SendInvitation",
			Handler:    _TestService_SendInvitation_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "TrackInvitation",
			Handler:       _TestService_TrackInvitation_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "DownloadInvitations",
			Handler:       _TestService_DownloadInvitations_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "testv1/test.proto",
}

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

Functions

func RegisterTestServiceHandler

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

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

func RegisterTestServiceHandlerClient

func RegisterTestServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TestServiceClient) error

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

func RegisterTestServiceHandlerFromEndpoint

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

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

func RegisterTestServiceHandlerServer

func RegisterTestServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TestServiceServer) error

RegisterTestServiceHandlerServer registers the http handlers for service TestService to "mux". UnaryRPC :call TestServiceServer 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 RegisterTestServiceHandlerFromEndpoint instead.

func RegisterTestServiceServer

func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer)

Types

type DownloadInvitationsRequest

type DownloadInvitationsRequest struct {
	Type *EventType `protobuf:"varint,1,opt,name=type,proto3,enum=io.akuity.test.v1.EventType,oneof" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*DownloadInvitationsRequest) Descriptor deprecated

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

Deprecated: Use DownloadInvitationsRequest.ProtoReflect.Descriptor instead.

func (*DownloadInvitationsRequest) GetType

func (*DownloadInvitationsRequest) ProtoMessage

func (*DownloadInvitationsRequest) ProtoMessage()

func (*DownloadInvitationsRequest) ProtoReflect

func (*DownloadInvitationsRequest) Reset

func (x *DownloadInvitationsRequest) Reset()

func (*DownloadInvitationsRequest) String

func (x *DownloadInvitationsRequest) String() string

type EventType

type EventType int32
const (
	EventType_EVENT_TYPE_UNDEFINED EventType = 0
	EventType_EVENT_TYPE_SEEN      EventType = 1
	EventType_EVENT_TYPE_ACCEPTED  EventType = 2
	EventType_EVENT_TYPE_REJECTED  EventType = 3
)

func (EventType) Descriptor

func (EventType) Descriptor() protoreflect.EnumDescriptor

func (EventType) Enum

func (x EventType) Enum() *EventType

func (EventType) EnumDescriptor deprecated

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

Deprecated: Use EventType.Descriptor instead.

func (EventType) Number

func (x EventType) Number() protoreflect.EnumNumber

func (EventType) String

func (x EventType) String() string

func (EventType) Type

type Invitation

type Invitation struct {
	Id     string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Invitation) Descriptor deprecated

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

Deprecated: Use Invitation.ProtoReflect.Descriptor instead.

func (*Invitation) GetId

func (x *Invitation) GetId() string

func (*Invitation) GetLabels

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

func (*Invitation) ProtoMessage

func (*Invitation) ProtoMessage()

func (*Invitation) ProtoReflect

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

func (*Invitation) Reset

func (x *Invitation) Reset()

func (*Invitation) String

func (x *Invitation) String() string

type InvitationMetadata

type InvitationMetadata struct {
	Raw map[string]string `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*InvitationMetadata) Descriptor deprecated

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

Deprecated: Use InvitationMetadata.ProtoReflect.Descriptor instead.

func (*InvitationMetadata) GetRaw

func (x *InvitationMetadata) GetRaw() map[string]string

func (*InvitationMetadata) ProtoMessage

func (*InvitationMetadata) ProtoMessage()

func (*InvitationMetadata) ProtoReflect

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

func (*InvitationMetadata) Reset

func (x *InvitationMetadata) Reset()

func (*InvitationMetadata) String

func (x *InvitationMetadata) String() string

type ListInvitationsQuery

type ListInvitationsQuery struct {
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ListInvitationsQuery) Descriptor deprecated

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

Deprecated: Use ListInvitationsQuery.ProtoReflect.Descriptor instead.

func (*ListInvitationsQuery) GetLabels

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

func (*ListInvitationsQuery) ProtoMessage

func (*ListInvitationsQuery) ProtoMessage()

func (*ListInvitationsQuery) ProtoReflect

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

func (*ListInvitationsQuery) Reset

func (x *ListInvitationsQuery) Reset()

func (*ListInvitationsQuery) String

func (x *ListInvitationsQuery) String() string

type ListInvitationsRequest

type ListInvitationsRequest struct {
	Query *ListInvitationsQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// contains filtered or unexported fields
}

func (*ListInvitationsRequest) Descriptor deprecated

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

Deprecated: Use ListInvitationsRequest.ProtoReflect.Descriptor instead.

func (*ListInvitationsRequest) GetQuery

func (*ListInvitationsRequest) ProtoMessage

func (*ListInvitationsRequest) ProtoMessage()

func (*ListInvitationsRequest) ProtoReflect

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

func (*ListInvitationsRequest) Reset

func (x *ListInvitationsRequest) Reset()

func (*ListInvitationsRequest) String

func (x *ListInvitationsRequest) String() string

type ListInvitationsResponse

type ListInvitationsResponse struct {
	Invitations []*Invitation `protobuf:"bytes,1,rep,name=invitations,proto3" json:"invitations,omitempty"`
	// contains filtered or unexported fields
}

func (*ListInvitationsResponse) Descriptor deprecated

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

Deprecated: Use ListInvitationsResponse.ProtoReflect.Descriptor instead.

func (*ListInvitationsResponse) GetInvitations

func (x *ListInvitationsResponse) GetInvitations() []*Invitation

func (*ListInvitationsResponse) ProtoMessage

func (*ListInvitationsResponse) ProtoMessage()

func (*ListInvitationsResponse) ProtoReflect

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

func (*ListInvitationsResponse) Reset

func (x *ListInvitationsResponse) Reset()

func (*ListInvitationsResponse) String

func (x *ListInvitationsResponse) String() string

type SendInvitationRequest

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

func (*SendInvitationRequest) Descriptor deprecated

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

Deprecated: Use SendInvitationRequest.ProtoReflect.Descriptor instead.

func (*SendInvitationRequest) GetEmail

func (x *SendInvitationRequest) GetEmail() string

func (*SendInvitationRequest) ProtoMessage

func (*SendInvitationRequest) ProtoMessage()

func (*SendInvitationRequest) ProtoReflect

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

func (*SendInvitationRequest) Reset

func (x *SendInvitationRequest) Reset()

func (*SendInvitationRequest) String

func (x *SendInvitationRequest) String() string

type SendInvitationResponse

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

func (*SendInvitationResponse) Descriptor deprecated

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

Deprecated: Use SendInvitationResponse.ProtoReflect.Descriptor instead.

func (*SendInvitationResponse) GetId

func (x *SendInvitationResponse) GetId() string

func (*SendInvitationResponse) ProtoMessage

func (*SendInvitationResponse) ProtoMessage()

func (*SendInvitationResponse) ProtoReflect

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

func (*SendInvitationResponse) Reset

func (x *SendInvitationResponse) Reset()

func (*SendInvitationResponse) String

func (x *SendInvitationResponse) String() string

type TestServiceClient

TestServiceClient is the client API for TestService 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 TestServiceGatewayClient

type TestServiceGatewayClient interface {
	ListInvitations(context.Context, *ListInvitationsRequest) (*ListInvitationsResponse, error)
	SendInvitation(context.Context, *SendInvitationRequest) (*SendInvitationResponse, error)
	TrackInvitation(context.Context, *TrackInvitationRequest) (<-chan *TrackInvitationResponse, <-chan error, error)
	DownloadInvitations(context.Context, *DownloadInvitationsRequest) (<-chan *httpbody.HttpBody, <-chan error, error)
}

TestServiceGatewayClient is the interface for TestService service client.

func NewTestServiceGatewayClient

func NewTestServiceGatewayClient(c gateway.Client) TestServiceGatewayClient

type TestServiceServer

type TestServiceServer interface {
	ListInvitations(context.Context, *ListInvitationsRequest) (*ListInvitationsResponse, error)
	SendInvitation(context.Context, *SendInvitationRequest) (*SendInvitationResponse, error)
	TrackInvitation(*TrackInvitationRequest, TestService_TrackInvitationServer) error
	DownloadInvitations(*DownloadInvitationsRequest, TestService_DownloadInvitationsServer) error
	// contains filtered or unexported methods
}

TestServiceServer is the server API for TestService service. All implementations must embed UnimplementedTestServiceServer for forward compatibility

type TestService_DownloadInvitationsClient

type TestService_DownloadInvitationsClient interface {
	Recv() (*httpbody.HttpBody, error)
	grpc.ClientStream
}

type TestService_DownloadInvitationsServer

type TestService_DownloadInvitationsServer interface {
	Send(*httpbody.HttpBody) error
	grpc.ServerStream
}

type TestService_TrackInvitationClient

type TestService_TrackInvitationClient interface {
	Recv() (*TrackInvitationResponse, error)
	grpc.ClientStream
}

type TestService_TrackInvitationServer

type TestService_TrackInvitationServer interface {
	Send(*TrackInvitationResponse) error
	grpc.ServerStream
}

type TrackInvitationRequest

type TrackInvitationRequest struct {
	Id   string     `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Type *EventType `protobuf:"varint,2,opt,name=type,proto3,enum=io.akuity.test.v1.EventType,oneof" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*TrackInvitationRequest) Descriptor deprecated

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

Deprecated: Use TrackInvitationRequest.ProtoReflect.Descriptor instead.

func (*TrackInvitationRequest) GetId

func (x *TrackInvitationRequest) GetId() string

func (*TrackInvitationRequest) GetType

func (x *TrackInvitationRequest) GetType() EventType

func (*TrackInvitationRequest) ProtoMessage

func (*TrackInvitationRequest) ProtoMessage()

func (*TrackInvitationRequest) ProtoReflect

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

func (*TrackInvitationRequest) Reset

func (x *TrackInvitationRequest) Reset()

func (*TrackInvitationRequest) String

func (x *TrackInvitationRequest) String() string

type TrackInvitationResponse

type TrackInvitationResponse struct {
	Type    EventType `protobuf:"varint,1,opt,name=type,proto3,enum=io.akuity.test.v1.EventType" json:"type,omitempty"`
	Message string    `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*TrackInvitationResponse) Descriptor deprecated

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

Deprecated: Use TrackInvitationResponse.ProtoReflect.Descriptor instead.

func (*TrackInvitationResponse) GetMessage

func (x *TrackInvitationResponse) GetMessage() string

func (*TrackInvitationResponse) GetType

func (x *TrackInvitationResponse) GetType() EventType

func (*TrackInvitationResponse) ProtoMessage

func (*TrackInvitationResponse) ProtoMessage()

func (*TrackInvitationResponse) ProtoReflect

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

func (*TrackInvitationResponse) Reset

func (x *TrackInvitationResponse) Reset()

func (*TrackInvitationResponse) String

func (x *TrackInvitationResponse) String() string

type UnimplementedTestServiceServer

type UnimplementedTestServiceServer struct {
}

UnimplementedTestServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTestServiceServer) ListInvitations

func (UnimplementedTestServiceServer) SendInvitation

type UnsafeTestServiceServer

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

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

Jump to

Keyboard shortcuts

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