protoapi

package
v0.0.0-...-ac7271b Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RegisterUserApiServer

func RegisterUserApiServer(s *grpc.Server, srv UserApiServer)

Types

type UnimplementedUserApiServer

type UnimplementedUserApiServer struct {
}

UnimplementedUserApiServer can be embedded to have forward compatible implementations.

func (*UnimplementedUserApiServer) CreateUser

func (*UnimplementedUserApiServer) DeleteUserByID

func (*UnimplementedUserApiServer) GetUserByEmail

func (*UnimplementedUserApiServer) GetUserByID

func (*UnimplementedUserApiServer) ListUsers

func (*UnimplementedUserApiServer) UpdateUser

type UserApiClient

type UserApiClient interface {
	CreateUser(ctx context.Context, in *UserDto, opts ...grpc.CallOption) (*UserDto, error)
	GetUserByID(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*UserDto, error)
	GetUserByEmail(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*UserDto, error)
	ListUsers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*UserDtoList, error)
	UpdateUser(ctx context.Context, in *UserDto, opts ...grpc.CallOption) (*UserDto, error)
	DeleteUserByID(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*wrappers.BoolValue, error)
}

UserApiClient is the client API for UserApi service.

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

func NewUserApiClient

func NewUserApiClient(cc grpc.ClientConnInterface) UserApiClient

type UserApiServer

type UserApiServer interface {
	CreateUser(context.Context, *UserDto) (*UserDto, error)
	GetUserByID(context.Context, *wrappers.StringValue) (*UserDto, error)
	GetUserByEmail(context.Context, *wrappers.StringValue) (*UserDto, error)
	ListUsers(context.Context, *empty.Empty) (*UserDtoList, error)
	UpdateUser(context.Context, *UserDto) (*UserDto, error)
	DeleteUserByID(context.Context, *wrappers.StringValue) (*wrappers.BoolValue, error)
}

UserApiServer is the server API for UserApi service.

type UserDto

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

func (*UserDto) Descriptor deprecated

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

Deprecated: Use UserDto.ProtoReflect.Descriptor instead.

func (*UserDto) GetEmail

func (x *UserDto) GetEmail() string

func (*UserDto) GetId

func (x *UserDto) GetId() string

func (*UserDto) GetName

func (x *UserDto) GetName() string

func (*UserDto) ProtoMessage

func (*UserDto) ProtoMessage()

func (*UserDto) ProtoReflect

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

func (*UserDto) Reset

func (x *UserDto) Reset()

func (*UserDto) String

func (x *UserDto) String() string

type UserDtoList

type UserDtoList struct {
	List []*UserDto `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

func (*UserDtoList) Descriptor deprecated

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

Deprecated: Use UserDtoList.ProtoReflect.Descriptor instead.

func (*UserDtoList) GetList

func (x *UserDtoList) GetList() []*UserDto

func (*UserDtoList) ProtoMessage

func (*UserDtoList) ProtoMessage()

func (*UserDtoList) ProtoReflect

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

func (*UserDtoList) Reset

func (x *UserDtoList) Reset()

func (*UserDtoList) String

func (x *UserDtoList) String() string

Jump to

Keyboard shortcuts

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