pb

package module
v0.0.0-...-6148fba Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AitrailblazerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aitrailblazer.service.v1.AitrailblazerService",
	HandlerType: (*AitrailblazerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendPing",
			Handler:    _AitrailblazerService_SendPing_Handler,
		},
		{
			MethodName: "Echo",
			Handler:    _AitrailblazerService_Echo_Handler,
		},
		{
			MethodName: "FindPets",
			Handler:    _AitrailblazerService_FindPets_Handler,
		},
		{
			MethodName: "AddPet",
			Handler:    _AitrailblazerService_AddPet_Handler,
		},
		{
			MethodName: "FindPetByID",
			Handler:    _AitrailblazerService_FindPetByID_Handler,
		},
		{
			MethodName: "DeletePet",
			Handler:    _AitrailblazerService_DeletePet_Handler,
		},
		{
			MethodName: "ListPets",
			Handler:    _AitrailblazerService_ListPets_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/service.proto",
}

AitrailblazerService_ServiceDesc is the grpc.ServiceDesc for AitrailblazerService 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_api_v1_service_proto protoreflect.FileDescriptor

Functions

func RegisterAitrailblazerServiceServer

func RegisterAitrailblazerServiceServer(s grpc.ServiceRegistrar, srv AitrailblazerServiceServer)

Types

type AddPetParameters

type AddPetParameters struct {
	NewPet *NewPet `protobuf:"bytes,1,opt,name=new_pet,json=newPet,proto3" json:"new_pet,omitempty"`
	// contains filtered or unexported fields
}

The AddPetParameters message is used as input for the AddPet RPC. It contains a field called "new_pet" of type NewPet, which holds the information about the new pet being added to the system. This includes the name and tag of the pet.

func (*AddPetParameters) Descriptor deprecated

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

Deprecated: Use AddPetParameters.ProtoReflect.Descriptor instead.

func (*AddPetParameters) GetNewPet

func (x *AddPetParameters) GetNewPet() *NewPet

func (*AddPetParameters) ProtoMessage

func (*AddPetParameters) ProtoMessage()

func (*AddPetParameters) ProtoReflect

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

func (*AddPetParameters) Reset

func (x *AddPetParameters) Reset()

func (*AddPetParameters) String

func (x *AddPetParameters) String() string

type AitrailblazerServiceClient

type AitrailblazerServiceClient interface {
	// SendPing
	SendPing(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
	// echo
	Echo(ctx context.Context, in *EchoMessage, opts ...grpc.CallOption) (*EchoMessage, error)
	// FindPets
	//
	// The FindPets RPC (Remote Procedure Call) allows
	// a client to search for pets based on certain
	// parameters. The parameters include tags
	// (such as breed, color, etc.) and a limit on the
	// number of pets to be returned. The RPC uses a
	// GET HTTP request to the "/pets" endpoint to
	// retrieve the desired pets. The result of the
	// RPC is a Pet message, which contains information
	// about the found pets.
	FindPets(ctx context.Context, in *FindPetsParameters, opts ...grpc.CallOption) (*Pet, error)
	// AddPet
	//
	// The AddPet RPC allows for the addition of a new
	// pet to the system. It takes in AddPetParameters
	// as input, which includes a NewPet message that
	// contains the name and tag of the new pet.
	// The RPC returns a Pet message, which likely
	// includes information about the newly added pet.
	// The RPC can be accessed via an HTTP POST request
	// to the "/pets" endpoint, with the new pet
	// information being sent in the body of the request.
	//
	// Example #1: name = "Spot", tag = "TagOfSpot"
	//
	// Example #2: name = "Fido", tag = "TagOfFido"
	//
	// Example #3: name = "Rover", tag = "TagOfRover"
	//
	// Example #4: name = "Spike", tag = "TagOfSpike"
	//
	// Example #5: name = "Buddy", tag = "TagOfBuddy"
	AddPet(ctx context.Context, in *AddPetParameters, opts ...grpc.CallOption) (*Pet, error)
	// FindPetByID
	// This is a function signature for a Remote Procedure
	// Call (RPC) in the Google API specification language.
	// The function is called "FindPetByID" and it takes
	// in a single input parameter called "FindPetByIDParameters".
	// The function returns a single output of type "Pet".
	//
	// The "option" statement specifies additional
	// options for the function, in this case specifying
	// that the function can be called using an HTTP GET
	// request to the URL "/pets/{id}", where "{id}" is
	// a placeholder for a specific pet ID.
	//
	// This function allows a client to retrieve
	// information about a specific pet by providing
	// the pet's ID as a parameter in the HTTP request.
	//
	// Returns a pet by ID
	FindPetByID(ctx context.Context, in *FindPetByIDParameters, opts ...grpc.CallOption) (*Pet, error)
	// DeletePet
	//
	// The DeletePet RPC (Remote Procedure Call) is used
	// to delete a pet from a database. It takes in a
	//
	//	DeletePetParameters message as input, which
	//
	// contains the ID of the pet to be deleted.
	// The RPC returns an Error message, which includes
	// a code and a message describing any errors that
	// may have occurred during the delete operation.
	// The RPC uses the HTTP DELETE method to delete
	// the pet from the database, with the ID of the
	// pet being specified in the URL as a path parameter.
	DeletePet(ctx context.Context, in *DeletePetParameters, opts ...grpc.CallOption) (*Error, error)
	// ListPets
	ListPets(ctx context.Context, in *ListPetsRequest, opts ...grpc.CallOption) (*ListPetsResponse, error)
}

AitrailblazerServiceClient is the client API for AitrailblazerService 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 AitrailblazerServiceServer

type AitrailblazerServiceServer interface {
	// SendPing
	SendPing(context.Context, *PingRequest) (*PingResponse, error)
	// echo
	Echo(context.Context, *EchoMessage) (*EchoMessage, error)
	// FindPets
	//
	// The FindPets RPC (Remote Procedure Call) allows
	// a client to search for pets based on certain
	// parameters. The parameters include tags
	// (such as breed, color, etc.) and a limit on the
	// number of pets to be returned. The RPC uses a
	// GET HTTP request to the "/pets" endpoint to
	// retrieve the desired pets. The result of the
	// RPC is a Pet message, which contains information
	// about the found pets.
	FindPets(context.Context, *FindPetsParameters) (*Pet, error)
	// AddPet
	//
	// The AddPet RPC allows for the addition of a new
	// pet to the system. It takes in AddPetParameters
	// as input, which includes a NewPet message that
	// contains the name and tag of the new pet.
	// The RPC returns a Pet message, which likely
	// includes information about the newly added pet.
	// The RPC can be accessed via an HTTP POST request
	// to the "/pets" endpoint, with the new pet
	// information being sent in the body of the request.
	//
	// Example #1: name = "Spot", tag = "TagOfSpot"
	//
	// Example #2: name = "Fido", tag = "TagOfFido"
	//
	// Example #3: name = "Rover", tag = "TagOfRover"
	//
	// Example #4: name = "Spike", tag = "TagOfSpike"
	//
	// Example #5: name = "Buddy", tag = "TagOfBuddy"
	AddPet(context.Context, *AddPetParameters) (*Pet, error)
	// FindPetByID
	// This is a function signature for a Remote Procedure
	// Call (RPC) in the Google API specification language.
	// The function is called "FindPetByID" and it takes
	// in a single input parameter called "FindPetByIDParameters".
	// The function returns a single output of type "Pet".
	//
	// The "option" statement specifies additional
	// options for the function, in this case specifying
	// that the function can be called using an HTTP GET
	// request to the URL "/pets/{id}", where "{id}" is
	// a placeholder for a specific pet ID.
	//
	// This function allows a client to retrieve
	// information about a specific pet by providing
	// the pet's ID as a parameter in the HTTP request.
	//
	// Returns a pet by ID
	FindPetByID(context.Context, *FindPetByIDParameters) (*Pet, error)
	// DeletePet
	//
	// The DeletePet RPC (Remote Procedure Call) is used
	// to delete a pet from a database. It takes in a
	//
	//	DeletePetParameters message as input, which
	//
	// contains the ID of the pet to be deleted.
	// The RPC returns an Error message, which includes
	// a code and a message describing any errors that
	// may have occurred during the delete operation.
	// The RPC uses the HTTP DELETE method to delete
	// the pet from the database, with the ID of the
	// pet being specified in the URL as a path parameter.
	DeletePet(context.Context, *DeletePetParameters) (*Error, error)
	// ListPets
	ListPets(context.Context, *ListPetsRequest) (*ListPetsResponse, error)
	// contains filtered or unexported methods
}

AitrailblazerServiceServer is the server API for AitrailblazerService service. All implementations must embed UnimplementedAitrailblazerServiceServer for forward compatibility

type DeletePetParameters

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

The Error message is used to communicate any

errors that may have occurred during the

delete operation. It contains a code field, which is an integer representing the error code, and a message field, which is a string describing the error in more detail. This message is returned by the DeletePet RPC if there is an issue with deleting the specified pet from the database.

func (*DeletePetParameters) Descriptor deprecated

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

Deprecated: Use DeletePetParameters.ProtoReflect.Descriptor instead.

func (*DeletePetParameters) GetId

func (x *DeletePetParameters) GetId() int64

func (*DeletePetParameters) ProtoMessage

func (*DeletePetParameters) ProtoMessage()

func (*DeletePetParameters) ProtoReflect

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

func (*DeletePetParameters) Reset

func (x *DeletePetParameters) Reset()

func (*DeletePetParameters) String

func (x *DeletePetParameters) String() string

type EchoMessage

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

func (*EchoMessage) Descriptor deprecated

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

Deprecated: Use EchoMessage.ProtoReflect.Descriptor instead.

func (*EchoMessage) GetValue

func (x *EchoMessage) GetValue() string

func (*EchoMessage) ProtoMessage

func (*EchoMessage) ProtoMessage()

func (*EchoMessage) ProtoReflect

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

func (*EchoMessage) Reset

func (x *EchoMessage) Reset()

func (*EchoMessage) String

func (x *EchoMessage) String() string

type Error

type Error struct {
	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() int32

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type FindPetByIDParameters

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

func (*FindPetByIDParameters) Descriptor deprecated

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

Deprecated: Use FindPetByIDParameters.ProtoReflect.Descriptor instead.

func (*FindPetByIDParameters) GetId

func (x *FindPetByIDParameters) GetId() int64

func (*FindPetByIDParameters) ProtoMessage

func (*FindPetByIDParameters) ProtoMessage()

func (*FindPetByIDParameters) ProtoReflect

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

func (*FindPetByIDParameters) Reset

func (x *FindPetByIDParameters) Reset()

func (*FindPetByIDParameters) String

func (x *FindPetByIDParameters) String() string

type FindPetsParameters

type FindPetsParameters struct {
	Tags  []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
	Limit int32    `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

The FindPetsParameters message contains the parameters for the FindPets RPC. It has two fields: tags and limit. The tags field is a repeated string field, which means it can contain multiple strings. These strings represent the tags used to search for pets. The limit field is an integer field that represents the maximum number of pets to be returned in the result.

func (*FindPetsParameters) Descriptor deprecated

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

Deprecated: Use FindPetsParameters.ProtoReflect.Descriptor instead.

func (*FindPetsParameters) GetLimit

func (x *FindPetsParameters) GetLimit() int32

func (*FindPetsParameters) GetTags

func (x *FindPetsParameters) GetTags() []string

func (*FindPetsParameters) ProtoMessage

func (*FindPetsParameters) ProtoMessage()

func (*FindPetsParameters) ProtoReflect

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

func (*FindPetsParameters) Reset

func (x *FindPetsParameters) Reset()

func (*FindPetsParameters) String

func (x *FindPetsParameters) String() string

type ListPetsRequest

type ListPetsRequest struct {

	// The maximum number of pets to return. The service may return fewer than
	// this value.
	// If unspecified, at most 50 pets will be returned.
	// The maximum value is 1000; values above 1000 will be coerced to 1000.
	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// A page token, received from a previous `ListPets` call.
	// Provide this to retrieve the subsequent page.
	//
	// When paginating, all other parameters provided to `ListBooks` must match
	// the call that provided the page token.
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// An expression that can be used to filter the list. Filters use the Common
	// Expression Language and can refer to all message fields.
	Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPetsRequest) Descriptor deprecated

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

Deprecated: Use ListPetsRequest.ProtoReflect.Descriptor instead.

func (*ListPetsRequest) GetFilter

func (x *ListPetsRequest) GetFilter() string

func (*ListPetsRequest) GetPageSize

func (x *ListPetsRequest) GetPageSize() int32

func (*ListPetsRequest) GetPageToken

func (x *ListPetsRequest) GetPageToken() string

func (*ListPetsRequest) ProtoMessage

func (*ListPetsRequest) ProtoMessage()

func (*ListPetsRequest) ProtoReflect

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

func (*ListPetsRequest) Reset

func (x *ListPetsRequest) Reset()

func (*ListPetsRequest) String

func (x *ListPetsRequest) String() string

type ListPetsResponse

type ListPetsResponse struct {

	// The Pets.
	Pets []*Pet `protobuf:"bytes,1,rep,name=pets,proto3" json:"pets,omitempty"`
	// A token, which can be sent as `page_token` to retrieve the next page.
	// If this field is omitted, there are no subsequent pages.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPetsResponse) Descriptor deprecated

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

Deprecated: Use ListPetsResponse.ProtoReflect.Descriptor instead.

func (*ListPetsResponse) GetNextPageToken

func (x *ListPetsResponse) GetNextPageToken() string

func (*ListPetsResponse) GetPets

func (x *ListPetsResponse) GetPets() []*Pet

func (*ListPetsResponse) ProtoMessage

func (*ListPetsResponse) ProtoMessage()

func (*ListPetsResponse) ProtoReflect

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

func (*ListPetsResponse) Reset

func (x *ListPetsResponse) Reset()

func (*ListPetsResponse) String

func (x *ListPetsResponse) String() string

type NewPet

type NewPet struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // [(validate.rules).string.min_len = 1];
	Tag  string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

The NewPet message contains information about a new pet being added to the system. It includes the name of the pet (a string) and a tag (also a string) that can be used to identify the pet. This message is used as the "new_pet" field in the AddPetParameters message, which is passed as input to the AddPet RPC.

func (*NewPet) Descriptor deprecated

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

Deprecated: Use NewPet.ProtoReflect.Descriptor instead.

func (*NewPet) GetName

func (x *NewPet) GetName() string

func (*NewPet) GetTag

func (x *NewPet) GetTag() string

func (*NewPet) ProtoMessage

func (*NewPet) ProtoMessage()

func (*NewPet) ProtoReflect

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

func (*NewPet) Reset

func (x *NewPet) Reset()

func (*NewPet) String

func (x *NewPet) String() string

type Pet

type Pet struct {

	// The name of the pet
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The tag of the pet
	Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"`
	// The id of the pet
	Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

The message Pet is a data structure that represents a pet in this gRPC function. It has three fields: name, tag, and id. The name field is a string that represents the name of the pet. The tag field is a string that represents a tag or label associated with the pet. The id field is an integer that represents a unique identifier for the pet. These three fields are defined as required fields, meaning that they must be provided when creating a new Pet object.

func (*Pet) Descriptor deprecated

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

Deprecated: Use Pet.ProtoReflect.Descriptor instead.

func (*Pet) GetId

func (x *Pet) GetId() int64

func (*Pet) GetName

func (x *Pet) GetName() string

func (*Pet) GetTag

func (x *Pet) GetTag() string

func (*Pet) ProtoMessage

func (*Pet) ProtoMessage()

func (*Pet) ProtoReflect

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

func (*Pet) Reset

func (x *Pet) Reset()

func (*Pet) String

func (x *Pet) String() string

type PingRequest

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

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) GetMessage

func (x *PingRequest) GetMessage() string

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

type PingResponse

type PingResponse struct {
	Pong *Pong `protobuf:"bytes,1,opt,name=pong,proto3" json:"pong,omitempty"`
	// contains filtered or unexported fields
}

func (*PingResponse) Descriptor deprecated

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) GetPong

func (x *PingResponse) GetPong() *Pong

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect

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

func (*PingResponse) Reset

func (x *PingResponse) Reset()

func (*PingResponse) String

func (x *PingResponse) String() string

type Pong

type Pong struct {
	Index      int32                  `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`                            // index
	Message    string                 `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`                         // message
	Ver        string                 `protobuf:"bytes,3,opt,name=ver,proto3" json:"ver,omitempty"`                                 // version
	ReceivedOn *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=received_on,json=receivedOn,proto3" json:"received_on,omitempty"` // received_on
	// contains filtered or unexported fields
}

func (*Pong) Descriptor deprecated

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

Deprecated: Use Pong.ProtoReflect.Descriptor instead.

func (*Pong) GetIndex

func (x *Pong) GetIndex() int32

func (*Pong) GetMessage

func (x *Pong) GetMessage() string

func (*Pong) GetReceivedOn

func (x *Pong) GetReceivedOn() *timestamppb.Timestamp

func (*Pong) GetVer

func (x *Pong) GetVer() string

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) ProtoReflect

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

func (*Pong) Reset

func (x *Pong) Reset()

func (*Pong) String

func (x *Pong) String() string

type UnimplementedAitrailblazerServiceServer

type UnimplementedAitrailblazerServiceServer struct {
}

UnimplementedAitrailblazerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAitrailblazerServiceServer) AddPet

func (UnimplementedAitrailblazerServiceServer) DeletePet

func (UnimplementedAitrailblazerServiceServer) Echo

func (UnimplementedAitrailblazerServiceServer) FindPetByID

func (UnimplementedAitrailblazerServiceServer) FindPets

func (UnimplementedAitrailblazerServiceServer) ListPets

func (UnimplementedAitrailblazerServiceServer) SendPing

type UnsafeAitrailblazerServiceServer

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

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

Jump to

Keyboard shortcuts

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