apispb

package
v0.0.0-...-15c1b16 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Api_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nitric.proto.apis.v1.Api",
	HandlerType: (*ApiServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ApiDetails",
			Handler:    _Api_ApiDetails_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Serve",
			Handler:       _Api_Serve_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "nitric/proto/apis/v1/apis.proto",
}

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

View Source
var File_nitric_proto_apis_v1_apis_proto protoreflect.FileDescriptor

Functions

func RegisterApiServer

func RegisterApiServer(s grpc.ServiceRegistrar, srv ApiServer)

Types

type ApiClient

type ApiClient interface {
	// Serve a route on an API
	Serve(ctx context.Context, opts ...grpc.CallOption) (Api_ServeClient, error)
	// Retrieve details about an API
	ApiDetails(ctx context.Context, in *ApiDetailsRequest, opts ...grpc.CallOption) (*ApiDetailsResponse, error)
}

ApiClient is the client API for Api 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 NewApiClient

func NewApiClient(cc grpc.ClientConnInterface) ApiClient

type ApiDetailsRequest

type ApiDetailsRequest struct {
	ApiName string `protobuf:"bytes,1,opt,name=api_name,json=apiName,proto3" json:"api_name,omitempty"`
	// contains filtered or unexported fields
}

func (*ApiDetailsRequest) Descriptor deprecated

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

Deprecated: Use ApiDetailsRequest.ProtoReflect.Descriptor instead.

func (*ApiDetailsRequest) GetApiName

func (x *ApiDetailsRequest) GetApiName() string

func (*ApiDetailsRequest) ProtoMessage

func (*ApiDetailsRequest) ProtoMessage()

func (*ApiDetailsRequest) ProtoReflect

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

func (*ApiDetailsRequest) Reset

func (x *ApiDetailsRequest) Reset()

func (*ApiDetailsRequest) String

func (x *ApiDetailsRequest) String() string

type ApiDetailsResponse

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

func (*ApiDetailsResponse) Descriptor deprecated

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

Deprecated: Use ApiDetailsResponse.ProtoReflect.Descriptor instead.

func (*ApiDetailsResponse) GetUrl

func (x *ApiDetailsResponse) GetUrl() string

func (*ApiDetailsResponse) ProtoMessage

func (*ApiDetailsResponse) ProtoMessage()

func (*ApiDetailsResponse) ProtoReflect

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

func (*ApiDetailsResponse) Reset

func (x *ApiDetailsResponse) Reset()

func (*ApiDetailsResponse) String

func (x *ApiDetailsResponse) String() string

type ApiServer

type ApiServer interface {
	// Serve a route on an API
	Serve(Api_ServeServer) error
	// Retrieve details about an API
	ApiDetails(context.Context, *ApiDetailsRequest) (*ApiDetailsResponse, error)
}

ApiServer is the server API for Api service. All implementations should embed UnimplementedApiServer for forward compatibility

type ApiWorkerOptions

type ApiWorkerOptions struct {

	// Apply security definitions to this operation
	// This will be mapped to named ApiSecurityDefinitionResource(s)
	Security map[string]*ApiWorkerScopes `` /* 157-byte string literal not displayed */
	// explicitly disable security for this endpoint
	// We need to do this as the default value of a repeated field
	// is always empty so there is no way of knowing if security is explicitly
	// disabled
	SecurityDisabled bool `protobuf:"varint,2,opt,name=security_disabled,json=securityDisabled,proto3" json:"security_disabled,omitempty"`
	// contains filtered or unexported fields
}

func (*ApiWorkerOptions) Descriptor deprecated

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

Deprecated: Use ApiWorkerOptions.ProtoReflect.Descriptor instead.

func (*ApiWorkerOptions) GetSecurity

func (x *ApiWorkerOptions) GetSecurity() map[string]*ApiWorkerScopes

func (*ApiWorkerOptions) GetSecurityDisabled

func (x *ApiWorkerOptions) GetSecurityDisabled() bool

func (*ApiWorkerOptions) ProtoMessage

func (*ApiWorkerOptions) ProtoMessage()

func (*ApiWorkerOptions) ProtoReflect

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

func (*ApiWorkerOptions) Reset

func (x *ApiWorkerOptions) Reset()

func (*ApiWorkerOptions) String

func (x *ApiWorkerOptions) String() string

type ApiWorkerScopes

type ApiWorkerScopes struct {
	Scopes []string `protobuf:"bytes,1,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*ApiWorkerScopes) Descriptor deprecated

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

Deprecated: Use ApiWorkerScopes.ProtoReflect.Descriptor instead.

func (*ApiWorkerScopes) GetScopes

func (x *ApiWorkerScopes) GetScopes() []string

func (*ApiWorkerScopes) ProtoMessage

func (*ApiWorkerScopes) ProtoMessage()

func (*ApiWorkerScopes) ProtoReflect

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

func (*ApiWorkerScopes) Reset

func (x *ApiWorkerScopes) Reset()

func (*ApiWorkerScopes) String

func (x *ApiWorkerScopes) String() string

type Api_ServeClient

type Api_ServeClient interface {
	Send(*ClientMessage) error
	Recv() (*ServerMessage, error)
	grpc.ClientStream
}

type Api_ServeServer

type Api_ServeServer interface {
	Send(*ServerMessage) error
	Recv() (*ClientMessage, error)
	grpc.ServerStream
}

type ClientMessage

type ClientMessage struct {

	// globally unique ID of the request/response pair
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Types that are assignable to Content:
	//
	//	*ClientMessage_RegistrationRequest
	//	*ClientMessage_HttpResponse
	Content isClientMessage_Content `protobuf_oneof:"content"`
	// contains filtered or unexported fields
}

ClientMessage sent by the service to the nitric server

func (*ClientMessage) Descriptor deprecated

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

Deprecated: Use ClientMessage.ProtoReflect.Descriptor instead.

func (*ClientMessage) GetContent

func (m *ClientMessage) GetContent() isClientMessage_Content

func (*ClientMessage) GetHttpResponse

func (x *ClientMessage) GetHttpResponse() *HttpResponse

func (*ClientMessage) GetId

func (x *ClientMessage) GetId() string

func (*ClientMessage) GetRegistrationRequest

func (x *ClientMessage) GetRegistrationRequest() *RegistrationRequest

func (*ClientMessage) ProtoMessage

func (*ClientMessage) ProtoMessage()

func (*ClientMessage) ProtoReflect

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

func (*ClientMessage) Reset

func (x *ClientMessage) Reset()

func (*ClientMessage) String

func (x *ClientMessage) String() string

type ClientMessage_HttpResponse

type ClientMessage_HttpResponse struct {
	// Response to an HTTP request
	HttpResponse *HttpResponse `protobuf:"bytes,3,opt,name=http_response,json=httpResponse,proto3,oneof"`
}

type ClientMessage_RegistrationRequest

type ClientMessage_RegistrationRequest struct {
	// Register an API route handler
	RegistrationRequest *RegistrationRequest `protobuf:"bytes,2,opt,name=registration_request,json=registrationRequest,proto3,oneof"`
}

type HeaderValue

type HeaderValue struct {
	Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*HeaderValue) Descriptor deprecated

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

Deprecated: Use HeaderValue.ProtoReflect.Descriptor instead.

func (*HeaderValue) GetValue

func (x *HeaderValue) GetValue() []string

func (*HeaderValue) ProtoMessage

func (*HeaderValue) ProtoMessage()

func (*HeaderValue) ProtoReflect

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

func (*HeaderValue) Reset

func (x *HeaderValue) Reset()

func (*HeaderValue) String

func (x *HeaderValue) String() string

type HttpRequest

type HttpRequest struct {

	// The request method
	Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	// The path of the request
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// HTTP request headers
	Headers map[string]*HeaderValue `` /* 155-byte string literal not displayed */
	// HTTP Query params
	QueryParams map[string]*QueryValue `` /* 182-byte string literal not displayed */
	// HTTP Path parameters
	PathParams map[string]string `` /* 179-byte string literal not displayed */
	// HTTP Request body
	Body []byte `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpRequest) Descriptor deprecated

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

Deprecated: Use HttpRequest.ProtoReflect.Descriptor instead.

func (*HttpRequest) GetBody

func (x *HttpRequest) GetBody() []byte

func (*HttpRequest) GetHeaders

func (x *HttpRequest) GetHeaders() map[string]*HeaderValue

func (*HttpRequest) GetMethod

func (x *HttpRequest) GetMethod() string

func (*HttpRequest) GetPath

func (x *HttpRequest) GetPath() string

func (*HttpRequest) GetPathParams

func (x *HttpRequest) GetPathParams() map[string]string

func (*HttpRequest) GetQueryParams

func (x *HttpRequest) GetQueryParams() map[string]*QueryValue

func (*HttpRequest) ProtoMessage

func (*HttpRequest) ProtoMessage()

func (*HttpRequest) ProtoReflect

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

func (*HttpRequest) Reset

func (x *HttpRequest) Reset()

func (*HttpRequest) String

func (x *HttpRequest) String() string

type HttpResponse

type HttpResponse struct {

	// The HTTP response status code
	Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	// HTTP response headers
	Headers map[string]*HeaderValue `` /* 155-byte string literal not displayed */
	// HTTP response body
	Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

HttpResponseMessage

func (*HttpResponse) Descriptor deprecated

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

Deprecated: Use HttpResponse.ProtoReflect.Descriptor instead.

func (*HttpResponse) GetBody

func (x *HttpResponse) GetBody() []byte

func (*HttpResponse) GetHeaders

func (x *HttpResponse) GetHeaders() map[string]*HeaderValue

func (*HttpResponse) GetStatus

func (x *HttpResponse) GetStatus() int32

func (*HttpResponse) ProtoMessage

func (*HttpResponse) ProtoMessage()

func (*HttpResponse) ProtoReflect

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

func (*HttpResponse) Reset

func (x *HttpResponse) Reset()

func (*HttpResponse) String

func (x *HttpResponse) String() string

type QueryValue

type QueryValue struct {
	Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryValue) Descriptor deprecated

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

Deprecated: Use QueryValue.ProtoReflect.Descriptor instead.

func (*QueryValue) GetValue

func (x *QueryValue) GetValue() []string

func (*QueryValue) ProtoMessage

func (*QueryValue) ProtoMessage()

func (*QueryValue) ProtoReflect

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

func (*QueryValue) Reset

func (x *QueryValue) Reset()

func (*QueryValue) String

func (x *QueryValue) String() string

type RegistrationRequest

type RegistrationRequest struct {
	Api     string            `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	Path    string            `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	Methods []string          `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
	Options *ApiWorkerOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*RegistrationRequest) Descriptor deprecated

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

Deprecated: Use RegistrationRequest.ProtoReflect.Descriptor instead.

func (*RegistrationRequest) GetApi

func (x *RegistrationRequest) GetApi() string

func (*RegistrationRequest) GetMethods

func (x *RegistrationRequest) GetMethods() []string

func (*RegistrationRequest) GetOptions

func (x *RegistrationRequest) GetOptions() *ApiWorkerOptions

func (*RegistrationRequest) GetPath

func (x *RegistrationRequest) GetPath() string

func (*RegistrationRequest) ProtoMessage

func (*RegistrationRequest) ProtoMessage()

func (*RegistrationRequest) ProtoReflect

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

func (*RegistrationRequest) Reset

func (x *RegistrationRequest) Reset()

func (*RegistrationRequest) String

func (x *RegistrationRequest) String() string

type RegistrationResponse

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

func (*RegistrationResponse) Descriptor deprecated

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

Deprecated: Use RegistrationResponse.ProtoReflect.Descriptor instead.

func (*RegistrationResponse) ProtoMessage

func (*RegistrationResponse) ProtoMessage()

func (*RegistrationResponse) ProtoReflect

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

func (*RegistrationResponse) Reset

func (x *RegistrationResponse) Reset()

func (*RegistrationResponse) String

func (x *RegistrationResponse) String() string

type ServerMessage

type ServerMessage struct {

	// globally unique ID of the request/response pair
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Types that are assignable to Content:
	//
	//	*ServerMessage_RegistrationResponse
	//	*ServerMessage_HttpRequest
	Content isServerMessage_Content `protobuf_oneof:"content"`
	// contains filtered or unexported fields
}

ServerMessage sent by the nitric server to the service

func (*ServerMessage) Descriptor deprecated

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

Deprecated: Use ServerMessage.ProtoReflect.Descriptor instead.

func (*ServerMessage) GetContent

func (m *ServerMessage) GetContent() isServerMessage_Content

func (*ServerMessage) GetHttpRequest

func (x *ServerMessage) GetHttpRequest() *HttpRequest

func (*ServerMessage) GetId

func (x *ServerMessage) GetId() string

func (*ServerMessage) GetRegistrationResponse

func (x *ServerMessage) GetRegistrationResponse() *RegistrationResponse

func (*ServerMessage) ProtoMessage

func (*ServerMessage) ProtoMessage()

func (*ServerMessage) ProtoReflect

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

func (*ServerMessage) Reset

func (x *ServerMessage) Reset()

func (*ServerMessage) String

func (x *ServerMessage) String() string

type ServerMessage_HttpRequest

type ServerMessage_HttpRequest struct {
	// HTTP request to be routed to the service (handler)
	HttpRequest *HttpRequest `protobuf:"bytes,3,opt,name=http_request,json=httpRequest,proto3,oneof"`
}

type ServerMessage_RegistrationResponse

type ServerMessage_RegistrationResponse struct {
	// Response to an API serve request
	RegistrationResponse *RegistrationResponse `protobuf:"bytes,2,opt,name=registration_response,json=registrationResponse,proto3,oneof"`
}

type UnimplementedApiServer

type UnimplementedApiServer struct {
}

UnimplementedApiServer should be embedded to have forward compatible implementations.

func (UnimplementedApiServer) ApiDetails

func (UnimplementedApiServer) Serve

type UnsafeApiServer

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

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

Jump to

Keyboard shortcuts

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