Documentation ¶
Index ¶
- Variables
- func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)
- type AdminCategory
- func (*AdminCategory) Descriptor() ([]byte, []int)deprecated
- func (x *AdminCategory) GetName() string
- func (x *AdminCategory) GetSlug() string
- func (x *AdminCategory) GetStatus() AdminCategory_Status
- func (*AdminCategory) ProtoMessage()
- func (x *AdminCategory) ProtoReflect() protoreflect.Message
- func (x *AdminCategory) Reset()
- func (x *AdminCategory) String() string
- type AdminCategory_Status
- func (AdminCategory_Status) Descriptor() protoreflect.EnumDescriptor
- func (x AdminCategory_Status) Enum() *AdminCategory_Status
- func (AdminCategory_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x AdminCategory_Status) Number() protoreflect.EnumNumber
- func (x AdminCategory_Status) String() string
- func (AdminCategory_Status) Type() protoreflect.EnumType
- type AdminClient
- type AdminPoem
- func (*AdminPoem) Descriptor() ([]byte, []int)deprecated
- func (x *AdminPoem) GetCategoryId() int32
- func (x *AdminPoem) GetText() string
- func (x *AdminPoem) GetTitle() string
- func (*AdminPoem) ProtoMessage()
- func (x *AdminPoem) ProtoReflect() protoreflect.Message
- func (x *AdminPoem) Reset()
- func (x *AdminPoem) String() string
- type AdminServer
- type CategoryResponse
- func (*CategoryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CategoryResponse) GetCategory() *AdminCategory
- func (x *CategoryResponse) GetSuccess() bool
- func (*CategoryResponse) ProtoMessage()
- func (x *CategoryResponse) ProtoReflect() protoreflect.Message
- func (x *CategoryResponse) Reset()
- func (x *CategoryResponse) String() string
- type PoemResponse
- func (*PoemResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PoemResponse) GetPoem() *AdminPoem
- func (x *PoemResponse) GetSuccess() bool
- func (*PoemResponse) ProtoMessage()
- func (x *PoemResponse) ProtoReflect() protoreflect.Message
- func (x *PoemResponse) Reset()
- func (x *PoemResponse) String() string
- type UnimplementedAdminServer
- type UnsafeAdminServer
Constants ¶
This section is empty.
Variables ¶
var ( AdminCategory_Status_name = map[int32]string{ 0: "PUBLISHED", 1: "DRAFT", } AdminCategory_Status_value = map[string]int32{ "PUBLISHED": 0, "DRAFT": 1, } )
Enum value maps for AdminCategory_Status.
var Admin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Admin", HandlerType: (*AdminServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddPoem", Handler: _Admin_AddPoem_Handler, }, { MethodName: "AddCategory", Handler: _Admin_AddCategory_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "admin/admin.proto", }
Admin_ServiceDesc is the grpc.ServiceDesc for Admin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_admin_admin_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAdminServer ¶
func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)
Types ¶
type AdminCategory ¶ added in v0.2.8
type AdminCategory struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` Status AdminCategory_Status `protobuf:"varint,3,opt,name=status,proto3,enum=AdminCategory_Status" json:"status,omitempty"` // contains filtered or unexported fields }
func (*AdminCategory) Descriptor
deprecated
added in
v0.2.8
func (*AdminCategory) Descriptor() ([]byte, []int)
Deprecated: Use AdminCategory.ProtoReflect.Descriptor instead.
func (*AdminCategory) GetName ¶ added in v0.2.8
func (x *AdminCategory) GetName() string
func (*AdminCategory) GetSlug ¶ added in v0.2.8
func (x *AdminCategory) GetSlug() string
func (*AdminCategory) GetStatus ¶ added in v0.3.0
func (x *AdminCategory) GetStatus() AdminCategory_Status
func (*AdminCategory) ProtoMessage ¶ added in v0.2.8
func (*AdminCategory) ProtoMessage()
func (*AdminCategory) ProtoReflect ¶ added in v0.2.8
func (x *AdminCategory) ProtoReflect() protoreflect.Message
func (*AdminCategory) Reset ¶ added in v0.2.8
func (x *AdminCategory) Reset()
func (*AdminCategory) String ¶ added in v0.2.8
func (x *AdminCategory) String() string
type AdminCategory_Status ¶ added in v0.3.0
type AdminCategory_Status int32
const ( AdminCategory_PUBLISHED AdminCategory_Status = 0 AdminCategory_DRAFT AdminCategory_Status = 1 )
func (AdminCategory_Status) Descriptor ¶ added in v0.3.0
func (AdminCategory_Status) Descriptor() protoreflect.EnumDescriptor
func (AdminCategory_Status) Enum ¶ added in v0.3.0
func (x AdminCategory_Status) Enum() *AdminCategory_Status
func (AdminCategory_Status) EnumDescriptor
deprecated
added in
v0.3.0
func (AdminCategory_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use AdminCategory_Status.Descriptor instead.
func (AdminCategory_Status) Number ¶ added in v0.3.0
func (x AdminCategory_Status) Number() protoreflect.EnumNumber
func (AdminCategory_Status) String ¶ added in v0.3.0
func (x AdminCategory_Status) String() string
func (AdminCategory_Status) Type ¶ added in v0.3.0
func (AdminCategory_Status) Type() protoreflect.EnumType
type AdminClient ¶
type AdminClient interface { // Add new poem AddPoem(ctx context.Context, in *AdminPoem, opts ...grpc.CallOption) (*PoemResponse, error) // Add new category AddCategory(ctx context.Context, in *AdminCategory, opts ...grpc.CallOption) (*CategoryResponse, error) }
AdminClient is the client API for Admin 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 NewAdminClient ¶
func NewAdminClient(cc grpc.ClientConnInterface) AdminClient
type AdminPoem ¶ added in v0.2.8
type AdminPoem struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` CategoryId int32 `protobuf:"varint,3,opt,name=categoryId,proto3" json:"categoryId,omitempty"` // contains filtered or unexported fields }
func (*AdminPoem) Descriptor
deprecated
added in
v0.2.8
func (*AdminPoem) GetCategoryId ¶ added in v0.3.0
func (*AdminPoem) ProtoMessage ¶ added in v0.2.8
func (*AdminPoem) ProtoMessage()
func (*AdminPoem) ProtoReflect ¶ added in v0.2.8
func (x *AdminPoem) ProtoReflect() protoreflect.Message
type AdminServer ¶
type AdminServer interface { // Add new poem AddPoem(context.Context, *AdminPoem) (*PoemResponse, error) // Add new category AddCategory(context.Context, *AdminCategory) (*CategoryResponse, error) // contains filtered or unexported methods }
AdminServer is the server API for Admin service. All implementations must embed UnimplementedAdminServer for forward compatibility
type CategoryResponse ¶
type CategoryResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Category *AdminCategory `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` // contains filtered or unexported fields }
The response message containing category object content.
func (*CategoryResponse) Descriptor
deprecated
func (*CategoryResponse) Descriptor() ([]byte, []int)
Deprecated: Use CategoryResponse.ProtoReflect.Descriptor instead.
func (*CategoryResponse) GetCategory ¶
func (x *CategoryResponse) GetCategory() *AdminCategory
func (*CategoryResponse) GetSuccess ¶
func (x *CategoryResponse) GetSuccess() bool
func (*CategoryResponse) ProtoMessage ¶
func (*CategoryResponse) ProtoMessage()
func (*CategoryResponse) ProtoReflect ¶
func (x *CategoryResponse) ProtoReflect() protoreflect.Message
func (*CategoryResponse) Reset ¶
func (x *CategoryResponse) Reset()
func (*CategoryResponse) String ¶
func (x *CategoryResponse) String() string
type PoemResponse ¶
type PoemResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Poem *AdminPoem `protobuf:"bytes,2,opt,name=poem,proto3" json:"poem,omitempty"` // contains filtered or unexported fields }
The response message containing poem object content.
func (*PoemResponse) Descriptor
deprecated
func (*PoemResponse) Descriptor() ([]byte, []int)
Deprecated: Use PoemResponse.ProtoReflect.Descriptor instead.
func (*PoemResponse) GetPoem ¶
func (x *PoemResponse) GetPoem() *AdminPoem
func (*PoemResponse) GetSuccess ¶
func (x *PoemResponse) GetSuccess() bool
func (*PoemResponse) ProtoMessage ¶
func (*PoemResponse) ProtoMessage()
func (*PoemResponse) ProtoReflect ¶
func (x *PoemResponse) ProtoReflect() protoreflect.Message
func (*PoemResponse) Reset ¶
func (x *PoemResponse) Reset()
func (*PoemResponse) String ¶
func (x *PoemResponse) String() string
type UnimplementedAdminServer ¶
type UnimplementedAdminServer struct { }
UnimplementedAdminServer must be embedded to have forward compatible implementations.
func (UnimplementedAdminServer) AddCategory ¶
func (UnimplementedAdminServer) AddCategory(context.Context, *AdminCategory) (*CategoryResponse, error)
func (UnimplementedAdminServer) AddPoem ¶
func (UnimplementedAdminServer) AddPoem(context.Context, *AdminPoem) (*PoemResponse, error)
type UnsafeAdminServer ¶
type UnsafeAdminServer interface {
// contains filtered or unexported methods
}
UnsafeAdminServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdminServer will result in compilation errors.