pb

package
v0.0.0-...-a474e13 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ActionType_name = map[int32]string{
		0: "SPECIFIED",
		1: "RELATED",
	}
	ActionType_value = map[string]int32{
		"SPECIFIED": 0,
		"RELATED":   1,
	}
)

Enum value maps for ActionType.

View Source
var BookGRPCHandler_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.BookGRPCHandler",
	HandlerType: (*BookGRPCHandlerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Fetch",
			Handler:    _BookGRPCHandler_Fetch_Handler,
		},
		{
			MethodName: "Show",
			Handler:    _BookGRPCHandler_Show_Handler,
		},
		{
			MethodName: "Store",
			Handler:    _BookGRPCHandler_Store_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _BookGRPCHandler_Update_Handler,
		},
		{
			MethodName: "Destroy",
			Handler:    _BookGRPCHandler_Destroy_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/pb/book.proto",
}

BookGRPCHandler_ServiceDesc is the grpc.ServiceDesc for BookGRPCHandler 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_pkg_pb_book_proto protoreflect.FileDescriptor
View Source
var File_pkg_pb_store_proto protoreflect.FileDescriptor
View Source
var StoreGRPCHandler_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.StoreGRPCHandler",
	HandlerType: (*StoreGRPCHandlerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Fetch",
			Handler:    _StoreGRPCHandler_Fetch_Handler,
		},
		{
			MethodName: "Show",
			Handler:    _StoreGRPCHandler_Show_Handler,
		},
		{
			MethodName: "Store",
			Handler:    _StoreGRPCHandler_Store_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _StoreGRPCHandler_Update_Handler,
		},
		{
			MethodName: "Destroy",
			Handler:    _StoreGRPCHandler_Destroy_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/pb/store.proto",
}

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

Functions

func RegisterBookGRPCHandlerServer

func RegisterBookGRPCHandlerServer(s grpc.ServiceRegistrar, srv BookGRPCHandlerServer)

func RegisterStoreGRPCHandlerServer

func RegisterStoreGRPCHandlerServer(s grpc.ServiceRegistrar, srv StoreGRPCHandlerServer)

Types

type ActionType

type ActionType int32
const (
	ActionType_SPECIFIED ActionType = 0
	ActionType_RELATED   ActionType = 1
)

func (ActionType) Descriptor

func (ActionType) Descriptor() protoreflect.EnumDescriptor

func (ActionType) Enum

func (x ActionType) Enum() *ActionType

func (ActionType) EnumDescriptor deprecated

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

Deprecated: Use ActionType.Descriptor instead.

func (ActionType) Number

func (x ActionType) Number() protoreflect.EnumNumber

func (ActionType) String

func (x ActionType) String() string

func (ActionType) Type

type BookAddRequest

type BookAddRequest struct {
	StoreId uint32 `protobuf:"varint,2,opt,name=store_id,json=storeId,proto3" json:"store_id,omitempty"`
	Name    string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*BookAddRequest) Descriptor deprecated

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

Deprecated: Use BookAddRequest.ProtoReflect.Descriptor instead.

func (*BookAddRequest) GetName

func (x *BookAddRequest) GetName() string

func (*BookAddRequest) GetStoreId

func (x *BookAddRequest) GetStoreId() uint32

func (*BookAddRequest) ProtoMessage

func (*BookAddRequest) ProtoMessage()

func (*BookAddRequest) ProtoReflect

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

func (*BookAddRequest) Reset

func (x *BookAddRequest) Reset()

func (*BookAddRequest) String

func (x *BookAddRequest) String() string

type BookBoolResponse

type BookBoolResponse struct {
	Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*BookBoolResponse) Descriptor deprecated

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

Deprecated: Use BookBoolResponse.ProtoReflect.Descriptor instead.

func (*BookBoolResponse) GetStatus

func (x *BookBoolResponse) GetStatus() bool

func (*BookBoolResponse) ProtoMessage

func (*BookBoolResponse) ProtoMessage()

func (*BookBoolResponse) ProtoReflect

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

func (*BookBoolResponse) Reset

func (x *BookBoolResponse) Reset()

func (*BookBoolResponse) String

func (x *BookBoolResponse) String() string

type BookGRPCHandlerClient

type BookGRPCHandlerClient interface {
	Fetch(ctx context.Context, in *BookIDModel, opts ...grpc.CallOption) (*BookRowsResponse, error)
	Show(ctx context.Context, in *BookIDModel, opts ...grpc.CallOption) (*BookRowResponse, error)
	Store(ctx context.Context, in *BookAddRequest, opts ...grpc.CallOption) (*BookBoolResponse, error)
	Update(ctx context.Context, in *BookModel, opts ...grpc.CallOption) (*BookBoolResponse, error)
	Destroy(ctx context.Context, in *BookIDModel, opts ...grpc.CallOption) (*BookBoolResponse, error)
}

BookGRPCHandlerClient is the client API for BookGRPCHandler 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 BookGRPCHandlerServer

type BookGRPCHandlerServer interface {
	Fetch(context.Context, *BookIDModel) (*BookRowsResponse, error)
	Show(context.Context, *BookIDModel) (*BookRowResponse, error)
	Store(context.Context, *BookAddRequest) (*BookBoolResponse, error)
	Update(context.Context, *BookModel) (*BookBoolResponse, error)
	Destroy(context.Context, *BookIDModel) (*BookBoolResponse, error)
	// contains filtered or unexported methods
}

BookGRPCHandlerServer is the server API for BookGRPCHandler service. All implementations must embed UnimplementedBookGRPCHandlerServer for forward compatibility

type BookIDModel

type BookIDModel struct {
	Id   uint32     `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Type ActionType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.ActionType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*BookIDModel) Descriptor deprecated

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

Deprecated: Use BookIDModel.ProtoReflect.Descriptor instead.

func (*BookIDModel) GetId

func (x *BookIDModel) GetId() uint32

func (*BookIDModel) GetType

func (x *BookIDModel) GetType() ActionType

func (*BookIDModel) ProtoMessage

func (*BookIDModel) ProtoMessage()

func (*BookIDModel) ProtoReflect

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

func (*BookIDModel) Reset

func (x *BookIDModel) Reset()

func (*BookIDModel) String

func (x *BookIDModel) String() string

type BookModel

type BookModel struct {
	Id      uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	StoreId uint32 `protobuf:"varint,2,opt,name=store_id,json=storeId,proto3" json:"store_id,omitempty"`
	Name    string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name.

func (*BookModel) Descriptor deprecated

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

Deprecated: Use BookModel.ProtoReflect.Descriptor instead.

func (*BookModel) GetId

func (x *BookModel) GetId() uint32

func (*BookModel) GetName

func (x *BookModel) GetName() string

func (*BookModel) GetStoreId

func (x *BookModel) GetStoreId() uint32

func (*BookModel) ProtoMessage

func (*BookModel) ProtoMessage()

func (*BookModel) ProtoReflect

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

func (*BookModel) Reset

func (x *BookModel) Reset()

func (*BookModel) String

func (x *BookModel) String() string

type BookRowResponse

type BookRowResponse struct {
	Book *BookModel `protobuf:"bytes,1,opt,name=book,proto3" json:"book,omitempty"`
	// contains filtered or unexported fields
}

func (*BookRowResponse) Descriptor deprecated

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

Deprecated: Use BookRowResponse.ProtoReflect.Descriptor instead.

func (*BookRowResponse) GetBook

func (x *BookRowResponse) GetBook() *BookModel

func (*BookRowResponse) ProtoMessage

func (*BookRowResponse) ProtoMessage()

func (*BookRowResponse) ProtoReflect

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

func (*BookRowResponse) Reset

func (x *BookRowResponse) Reset()

func (*BookRowResponse) String

func (x *BookRowResponse) String() string

type BookRowsResponse

type BookRowsResponse struct {
	Books []*BookModel `protobuf:"bytes,1,rep,name=books,proto3" json:"books,omitempty"`
	// contains filtered or unexported fields
}

func (*BookRowsResponse) Descriptor deprecated

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

Deprecated: Use BookRowsResponse.ProtoReflect.Descriptor instead.

func (*BookRowsResponse) GetBooks

func (x *BookRowsResponse) GetBooks() []*BookModel

func (*BookRowsResponse) ProtoMessage

func (*BookRowsResponse) ProtoMessage()

func (*BookRowsResponse) ProtoReflect

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

func (*BookRowsResponse) Reset

func (x *BookRowsResponse) Reset()

func (*BookRowsResponse) String

func (x *BookRowsResponse) String() string

type StoreBoolResponse

type StoreBoolResponse struct {
	Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*StoreBoolResponse) Descriptor deprecated

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

Deprecated: Use StoreBoolResponse.ProtoReflect.Descriptor instead.

func (*StoreBoolResponse) GetStatus

func (x *StoreBoolResponse) GetStatus() bool

func (*StoreBoolResponse) ProtoMessage

func (*StoreBoolResponse) ProtoMessage()

func (*StoreBoolResponse) ProtoReflect

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

func (*StoreBoolResponse) Reset

func (x *StoreBoolResponse) Reset()

func (*StoreBoolResponse) String

func (x *StoreBoolResponse) String() string

type StoreEmptyRequest

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

func (*StoreEmptyRequest) Descriptor deprecated

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

Deprecated: Use StoreEmptyRequest.ProtoReflect.Descriptor instead.

func (*StoreEmptyRequest) ProtoMessage

func (*StoreEmptyRequest) ProtoMessage()

func (*StoreEmptyRequest) ProtoReflect

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

func (*StoreEmptyRequest) Reset

func (x *StoreEmptyRequest) Reset()

func (*StoreEmptyRequest) String

func (x *StoreEmptyRequest) String() string

type StoreGRPCHandlerClient

type StoreGRPCHandlerClient interface {
	Fetch(ctx context.Context, in *StoreEmptyRequest, opts ...grpc.CallOption) (*StoreRowsResponse, error)
	Show(ctx context.Context, in *StoreIDModel, opts ...grpc.CallOption) (*StoreRowResponse, error)
	Store(ctx context.Context, in *StoreNameModel, opts ...grpc.CallOption) (*StoreBoolResponse, error)
	Update(ctx context.Context, in *StoreModel, opts ...grpc.CallOption) (*StoreBoolResponse, error)
	Destroy(ctx context.Context, in *StoreIDModel, opts ...grpc.CallOption) (*StoreBoolResponse, error)
}

StoreGRPCHandlerClient is the client API for StoreGRPCHandler 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 StoreGRPCHandlerServer

type StoreGRPCHandlerServer interface {
	Fetch(context.Context, *StoreEmptyRequest) (*StoreRowsResponse, error)
	Show(context.Context, *StoreIDModel) (*StoreRowResponse, error)
	Store(context.Context, *StoreNameModel) (*StoreBoolResponse, error)
	Update(context.Context, *StoreModel) (*StoreBoolResponse, error)
	Destroy(context.Context, *StoreIDModel) (*StoreBoolResponse, error)
	// contains filtered or unexported methods
}

StoreGRPCHandlerServer is the server API for StoreGRPCHandler service. All implementations must embed UnimplementedStoreGRPCHandlerServer for forward compatibility

type StoreIDModel

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

func (*StoreIDModel) Descriptor deprecated

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

Deprecated: Use StoreIDModel.ProtoReflect.Descriptor instead.

func (*StoreIDModel) GetId

func (x *StoreIDModel) GetId() uint32

func (*StoreIDModel) ProtoMessage

func (*StoreIDModel) ProtoMessage()

func (*StoreIDModel) ProtoReflect

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

func (*StoreIDModel) Reset

func (x *StoreIDModel) Reset()

func (*StoreIDModel) String

func (x *StoreIDModel) String() string

type StoreModel

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

func (*StoreModel) Descriptor deprecated

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

Deprecated: Use StoreModel.ProtoReflect.Descriptor instead.

func (*StoreModel) GetId

func (x *StoreModel) GetId() uint32

func (*StoreModel) GetName

func (x *StoreModel) GetName() string

func (*StoreModel) ProtoMessage

func (*StoreModel) ProtoMessage()

func (*StoreModel) ProtoReflect

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

func (*StoreModel) Reset

func (x *StoreModel) Reset()

func (*StoreModel) String

func (x *StoreModel) String() string

type StoreNameModel

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

func (*StoreNameModel) Descriptor deprecated

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

Deprecated: Use StoreNameModel.ProtoReflect.Descriptor instead.

func (*StoreNameModel) GetName

func (x *StoreNameModel) GetName() string

func (*StoreNameModel) ProtoMessage

func (*StoreNameModel) ProtoMessage()

func (*StoreNameModel) ProtoReflect

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

func (*StoreNameModel) Reset

func (x *StoreNameModel) Reset()

func (*StoreNameModel) String

func (x *StoreNameModel) String() string

type StoreRowResponse

type StoreRowResponse struct {
	Store *StoreModel `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"`
	// contains filtered or unexported fields
}

func (*StoreRowResponse) Descriptor deprecated

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

Deprecated: Use StoreRowResponse.ProtoReflect.Descriptor instead.

func (*StoreRowResponse) GetStore

func (x *StoreRowResponse) GetStore() *StoreModel

func (*StoreRowResponse) ProtoMessage

func (*StoreRowResponse) ProtoMessage()

func (*StoreRowResponse) ProtoReflect

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

func (*StoreRowResponse) Reset

func (x *StoreRowResponse) Reset()

func (*StoreRowResponse) String

func (x *StoreRowResponse) String() string

type StoreRowsResponse

type StoreRowsResponse struct {
	Stores []*StoreModel `protobuf:"bytes,1,rep,name=stores,proto3" json:"stores,omitempty"`
	// contains filtered or unexported fields
}

func (*StoreRowsResponse) Descriptor deprecated

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

Deprecated: Use StoreRowsResponse.ProtoReflect.Descriptor instead.

func (*StoreRowsResponse) GetStores

func (x *StoreRowsResponse) GetStores() []*StoreModel

func (*StoreRowsResponse) ProtoMessage

func (*StoreRowsResponse) ProtoMessage()

func (*StoreRowsResponse) ProtoReflect

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

func (*StoreRowsResponse) Reset

func (x *StoreRowsResponse) Reset()

func (*StoreRowsResponse) String

func (x *StoreRowsResponse) String() string

type UnimplementedBookGRPCHandlerServer

type UnimplementedBookGRPCHandlerServer struct {
}

UnimplementedBookGRPCHandlerServer must be embedded to have forward compatible implementations.

func (UnimplementedBookGRPCHandlerServer) Destroy

func (UnimplementedBookGRPCHandlerServer) Fetch

func (UnimplementedBookGRPCHandlerServer) Show

func (UnimplementedBookGRPCHandlerServer) Store

func (UnimplementedBookGRPCHandlerServer) Update

type UnimplementedStoreGRPCHandlerServer

type UnimplementedStoreGRPCHandlerServer struct {
}

UnimplementedStoreGRPCHandlerServer must be embedded to have forward compatible implementations.

func (UnimplementedStoreGRPCHandlerServer) Destroy

func (UnimplementedStoreGRPCHandlerServer) Fetch

func (UnimplementedStoreGRPCHandlerServer) Show

func (UnimplementedStoreGRPCHandlerServer) Store

func (UnimplementedStoreGRPCHandlerServer) Update

type UnsafeBookGRPCHandlerServer

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

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

type UnsafeStoreGRPCHandlerServer

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

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

Jump to

Keyboard shortcuts

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