grpc

package
v0.0.0-...-50f4c6c Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_users_proto protoreflect.FileDescriptor

Functions

func RegisterUsersCRUDServer

func RegisterUsersCRUDServer(s *grpc.Server, srv UsersCRUDServer)

Types

type ID

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

func (*ID) Descriptor deprecated

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

Deprecated: Use ID.ProtoReflect.Descriptor instead.

func (*ID) GetId

func (x *ID) GetId() uint64

func (*ID) ProtoMessage

func (*ID) ProtoMessage()

func (*ID) ProtoReflect

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

func (*ID) Reset

func (x *ID) Reset()

func (*ID) String

func (x *ID) String() string

type ListUserReq

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

func (*ListUserReq) Descriptor deprecated

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

Deprecated: Use ListUserReq.ProtoReflect.Descriptor instead.

func (*ListUserReq) ProtoMessage

func (*ListUserReq) ProtoMessage()

func (*ListUserReq) ProtoReflect

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

func (*ListUserReq) Reset

func (x *ListUserReq) Reset()

func (*ListUserReq) String

func (x *ListUserReq) String() string

type ListUserRes

type ListUserRes struct {
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserRes) Descriptor deprecated

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

Deprecated: Use ListUserRes.ProtoReflect.Descriptor instead.

func (*ListUserRes) GetUsers

func (x *ListUserRes) GetUsers() []*User

func (*ListUserRes) ProtoMessage

func (*ListUserRes) ProtoMessage()

func (*ListUserRes) ProtoReflect

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

func (*ListUserRes) Reset

func (x *ListUserRes) Reset()

func (*ListUserRes) String

func (x *ListUserRes) String() string

type UnimplementedUsersCRUDServer

type UnimplementedUsersCRUDServer struct {
}

UnimplementedUsersCRUDServer can be embedded to have forward compatible implementations.

func (*UnimplementedUsersCRUDServer) CreateUser

func (*UnimplementedUsersCRUDServer) DeleteUser

func (*UnimplementedUsersCRUDServer) ListUsers

func (*UnimplementedUsersCRUDServer) ReadUser

func (*UnimplementedUsersCRUDServer) UpdateUser

type User

type User struct {
	Id       uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Hash     string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetHash

func (x *User) GetHash() string

func (*User) GetId

func (x *User) GetId() uint64

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserInput

type UserInput struct {
	Id       uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInput) Descriptor deprecated

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

Deprecated: Use UserInput.ProtoReflect.Descriptor instead.

func (*UserInput) GetId

func (x *UserInput) GetId() uint64

func (*UserInput) GetPassword

func (x *UserInput) GetPassword() string

func (*UserInput) GetUsername

func (x *UserInput) GetUsername() string

func (*UserInput) ProtoMessage

func (*UserInput) ProtoMessage()

func (*UserInput) ProtoReflect

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

func (*UserInput) Reset

func (x *UserInput) Reset()

func (*UserInput) String

func (x *UserInput) String() string

type UserResponse

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

func (*UserResponse) Descriptor deprecated

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

Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.

func (*UserResponse) GetId

func (x *UserResponse) GetId() uint64

func (*UserResponse) ProtoMessage

func (*UserResponse) ProtoMessage()

func (*UserResponse) ProtoReflect

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

func (*UserResponse) Reset

func (x *UserResponse) Reset()

func (*UserResponse) String

func (x *UserResponse) String() string

type UsersCRUDClient

type UsersCRUDClient interface {
	CreateUser(ctx context.Context, in *UserInput, opts ...grpc.CallOption) (*UserResponse, error)
	ReadUser(ctx context.Context, in *ID, opts ...grpc.CallOption) (*User, error)
	UpdateUser(ctx context.Context, in *UserInput, opts ...grpc.CallOption) (*UserResponse, error)
	DeleteUser(ctx context.Context, in *ID, opts ...grpc.CallOption) (*UserResponse, error)
	ListUsers(ctx context.Context, in *ListUserReq, opts ...grpc.CallOption) (*ListUserRes, error)
}

UsersCRUDClient is the client API for UsersCRUD service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewUsersCRUDClient

func NewUsersCRUDClient(cc grpc.ClientConnInterface) UsersCRUDClient

type UsersCRUDServer

type UsersCRUDServer interface {
	CreateUser(context.Context, *UserInput) (*UserResponse, error)
	ReadUser(context.Context, *ID) (*User, error)
	UpdateUser(context.Context, *UserInput) (*UserResponse, error)
	DeleteUser(context.Context, *ID) (*UserResponse, error)
	ListUsers(context.Context, *ListUserReq) (*ListUserRes, error)
}

UsersCRUDServer is the server API for UsersCRUD service.

Jump to

Keyboard shortcuts

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