proto

package module
v0.0.0-...-bb165cb Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: GPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Albums_Create_FullMethodName    = "/album.Albums/Create"
	Albums_Read_FullMethodName      = "/album.Albums/Read"
	Albums_Update_FullMethodName    = "/album.Albums/Update"
	Albums_Delete_FullMethodName    = "/album.Albums/Delete"
	Albums_Increment_FullMethodName = "/album.Albums/Increment"
	Albums_Decrement_FullMethodName = "/album.Albums/Decrement"
)

Variables

View Source
var Albums_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "album.Albums",
	HandlerType: (*AlbumsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Albums_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Albums_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Albums_Delete_Handler,
		},
		{
			MethodName: "Increment",
			Handler:    _Albums_Increment_Handler,
		},
		{
			MethodName: "Decrement",
			Handler:    _Albums_Decrement_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Read",
			Handler:       _Albums_Read_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "album.proto",
}

Albums_ServiceDesc is the grpc.ServiceDesc for Albums 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_album_proto protoreflect.FileDescriptor

Functions

func RegisterAlbumsServer

func RegisterAlbumsServer(s grpc.ServiceRegistrar, srv AlbumsServer)

Types

type Album

type Album struct {
	Id     int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title  string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Artist string `protobuf:"bytes,3,opt,name=artist,proto3" json:"artist,omitempty"`
	Score  int64  `protobuf:"varint,4,opt,name=score,proto3" json:"score,omitempty"`
	Cover  string `protobuf:"bytes,5,opt,name=cover,proto3" json:"cover,omitempty"`
	// contains filtered or unexported fields
}

func (*Album) Descriptor deprecated

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

Deprecated: Use Album.ProtoReflect.Descriptor instead.

func (*Album) GetArtist

func (x *Album) GetArtist() string

func (*Album) GetCover

func (x *Album) GetCover() string

func (*Album) GetId

func (x *Album) GetId() int64

func (*Album) GetScore

func (x *Album) GetScore() int64

func (*Album) GetTitle

func (x *Album) GetTitle() string

func (*Album) ProtoMessage

func (*Album) ProtoMessage()

func (*Album) ProtoReflect

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

func (*Album) Reset

func (x *Album) Reset()

func (*Album) String

func (x *Album) String() string

type AlbumsClient

type AlbumsClient interface {
	Create(ctx context.Context, in *Album, opts ...grpc.CallOption) (*Identifier, error)
	Read(ctx context.Context, in *Nil, opts ...grpc.CallOption) (Albums_ReadClient, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*Nil, error)
	Delete(ctx context.Context, in *Album, opts ...grpc.CallOption) (*Nil, error)
	Increment(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Score, error)
	Decrement(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Score, error)
}

AlbumsClient is the client API for Albums 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 NewAlbumsClient

func NewAlbumsClient(cc grpc.ClientConnInterface) AlbumsClient

type AlbumsServer

type AlbumsServer interface {
	Create(context.Context, *Album) (*Identifier, error)
	Read(*Nil, Albums_ReadServer) error
	Update(context.Context, *UpdateRequest) (*Nil, error)
	Delete(context.Context, *Album) (*Nil, error)
	Increment(context.Context, *Identifier) (*Score, error)
	Decrement(context.Context, *Identifier) (*Score, error)
	// contains filtered or unexported methods
}

AlbumsServer is the server API for Albums service. All implementations must embed UnimplementedAlbumsServer for forward compatibility

type Albums_ReadClient

type Albums_ReadClient interface {
	Recv() (*Album, error)
	grpc.ClientStream
}

type Albums_ReadServer

type Albums_ReadServer interface {
	Send(*Album) error
	grpc.ServerStream
}

type Identifier

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

func (*Identifier) Descriptor deprecated

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

Deprecated: Use Identifier.ProtoReflect.Descriptor instead.

func (*Identifier) GetId

func (x *Identifier) GetId() int64

func (*Identifier) ProtoMessage

func (*Identifier) ProtoMessage()

func (*Identifier) ProtoReflect

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

func (*Identifier) Reset

func (x *Identifier) Reset()

func (*Identifier) String

func (x *Identifier) String() string

type Nil

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

func (*Nil) Descriptor deprecated

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

Deprecated: Use Nil.ProtoReflect.Descriptor instead.

func (*Nil) ProtoMessage

func (*Nil) ProtoMessage()

func (*Nil) ProtoReflect

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

func (*Nil) Reset

func (x *Nil) Reset()

func (*Nil) String

func (x *Nil) String() string

type Score

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

func (*Score) Descriptor deprecated

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

Deprecated: Use Score.ProtoReflect.Descriptor instead.

func (*Score) GetScore

func (x *Score) GetScore() int64

func (*Score) ProtoMessage

func (*Score) ProtoMessage()

func (*Score) ProtoReflect

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

func (*Score) Reset

func (x *Score) Reset()

func (*Score) String

func (x *Score) String() string

type UnimplementedAlbumsServer

type UnimplementedAlbumsServer struct {
}

UnimplementedAlbumsServer must be embedded to have forward compatible implementations.

func (UnimplementedAlbumsServer) Create

func (UnimplementedAlbumsServer) Decrement

func (UnimplementedAlbumsServer) Delete

func (UnimplementedAlbumsServer) Increment

func (UnimplementedAlbumsServer) Read

func (UnimplementedAlbumsServer) Update

type UnsafeAlbumsServer

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

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

type UpdateRequest

type UpdateRequest struct {
	OldAlbum *Album `protobuf:"bytes,1,opt,name=oldAlbum,proto3" json:"oldAlbum,omitempty"`
	NewAlbum *Album `protobuf:"bytes,2,opt,name=newAlbum,proto3" json:"newAlbum,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetNewAlbum

func (x *UpdateRequest) GetNewAlbum() *Album

func (*UpdateRequest) GetOldAlbum

func (x *UpdateRequest) GetOldAlbum() *Album

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

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

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

Jump to

Keyboard shortcuts

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