api

package
v0.0.0-...-0231498 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUserServer

func RegisterUserServer(s *grpc.Server, srv UserServer)

Types

type Error

type Error struct {
	Code                 string   `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Error) Descriptor

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

func (*Error) GetCode

func (m *Error) GetCode() string

func (*Error) GetMessage

func (m *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Error) XXX_Merge

func (m *Error) XXX_Merge(src proto.Message)

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

func (m *Error) XXX_Unmarshal(b []byte) error

type ErrorResponse

type ErrorResponse struct {
	Error                *Error   `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ErrorResponse) Descriptor

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

func (*ErrorResponse) GetError

func (m *ErrorResponse) GetError() *Error

func (*ErrorResponse) ProtoMessage

func (*ErrorResponse) ProtoMessage()

func (*ErrorResponse) Reset

func (m *ErrorResponse) Reset()

func (*ErrorResponse) String

func (m *ErrorResponse) String() string

func (*ErrorResponse) XXX_DiscardUnknown

func (m *ErrorResponse) XXX_DiscardUnknown()

func (*ErrorResponse) XXX_Marshal

func (m *ErrorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ErrorResponse) XXX_Merge

func (m *ErrorResponse) XXX_Merge(src proto.Message)

func (*ErrorResponse) XXX_Size

func (m *ErrorResponse) XXX_Size() int

func (*ErrorResponse) XXX_Unmarshal

func (m *ErrorResponse) XXX_Unmarshal(b []byte) error

type FindUserReply

type FindUserReply struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Username             string   `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Nickname             string   `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"`
	Password             string   `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	Intro                string   `protobuf:"bytes,5,opt,name=intro,proto3" json:"intro,omitempty"`
	IsApproved           bool     `protobuf:"varint,6,opt,name=is_approved,json=isApproved,proto3" json:"is_approved,omitempty"`
	CreatedAt            string   `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt            string   `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	Error                *Error   `protobuf:"bytes,99,opt,name=error,proto3" json:"error,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FindUserReply) Descriptor

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

func (*FindUserReply) GetCreatedAt

func (m *FindUserReply) GetCreatedAt() string

func (*FindUserReply) GetError

func (m *FindUserReply) GetError() *Error

func (*FindUserReply) GetId

func (m *FindUserReply) GetId() string

func (*FindUserReply) GetIntro

func (m *FindUserReply) GetIntro() string

func (*FindUserReply) GetIsApproved

func (m *FindUserReply) GetIsApproved() bool

func (*FindUserReply) GetNickname

func (m *FindUserReply) GetNickname() string

func (*FindUserReply) GetPassword

func (m *FindUserReply) GetPassword() string

func (*FindUserReply) GetUpdatedAt

func (m *FindUserReply) GetUpdatedAt() string

func (*FindUserReply) GetUsername

func (m *FindUserReply) GetUsername() string

func (*FindUserReply) ProtoMessage

func (*FindUserReply) ProtoMessage()

func (*FindUserReply) Reset

func (m *FindUserReply) Reset()

func (*FindUserReply) String

func (m *FindUserReply) String() string

func (*FindUserReply) XXX_DiscardUnknown

func (m *FindUserReply) XXX_DiscardUnknown()

func (*FindUserReply) XXX_Marshal

func (m *FindUserReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FindUserReply) XXX_Merge

func (m *FindUserReply) XXX_Merge(src proto.Message)

func (*FindUserReply) XXX_Size

func (m *FindUserReply) XXX_Size() int

func (*FindUserReply) XXX_Unmarshal

func (m *FindUserReply) XXX_Unmarshal(b []byte) error

type FindUserRequest

type FindUserRequest struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FindUserRequest) Descriptor

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

func (*FindUserRequest) GetId

func (m *FindUserRequest) GetId() string

func (*FindUserRequest) ProtoMessage

func (*FindUserRequest) ProtoMessage()

func (*FindUserRequest) Reset

func (m *FindUserRequest) Reset()

func (*FindUserRequest) String

func (m *FindUserRequest) String() string

func (*FindUserRequest) XXX_DiscardUnknown

func (m *FindUserRequest) XXX_DiscardUnknown()

func (*FindUserRequest) XXX_Marshal

func (m *FindUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FindUserRequest) XXX_Merge

func (m *FindUserRequest) XXX_Merge(src proto.Message)

func (*FindUserRequest) XXX_Size

func (m *FindUserRequest) XXX_Size() int

func (*FindUserRequest) XXX_Unmarshal

func (m *FindUserRequest) XXX_Unmarshal(b []byte) error

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer can be embedded to have forward compatible implementations.

func (*UnimplementedUserServer) Find

func (*UnimplementedUserServer) Update

type UpdateUserReply

type UpdateUserReply struct {
	Err                  string   `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdateUserReply) Descriptor

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

func (*UpdateUserReply) GetErr

func (m *UpdateUserReply) GetErr() string

func (*UpdateUserReply) ProtoMessage

func (*UpdateUserReply) ProtoMessage()

func (*UpdateUserReply) Reset

func (m *UpdateUserReply) Reset()

func (*UpdateUserReply) String

func (m *UpdateUserReply) String() string

func (*UpdateUserReply) XXX_DiscardUnknown

func (m *UpdateUserReply) XXX_DiscardUnknown()

func (*UpdateUserReply) XXX_Marshal

func (m *UpdateUserReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdateUserReply) XXX_Merge

func (m *UpdateUserReply) XXX_Merge(src proto.Message)

func (*UpdateUserReply) XXX_Size

func (m *UpdateUserReply) XXX_Size() int

func (*UpdateUserReply) XXX_Unmarshal

func (m *UpdateUserReply) XXX_Unmarshal(b []byte) error

type UpdateUserRequest

type UpdateUserRequest struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Username             string   `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Nickname             string   `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"`
	Password             string   `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	Intro                string   `protobuf:"bytes,5,opt,name=intro,proto3" json:"intro,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdateUserRequest) Descriptor

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

func (*UpdateUserRequest) GetId

func (m *UpdateUserRequest) GetId() string

func (*UpdateUserRequest) GetIntro

func (m *UpdateUserRequest) GetIntro() string

func (*UpdateUserRequest) GetNickname

func (m *UpdateUserRequest) GetNickname() string

func (*UpdateUserRequest) GetPassword

func (m *UpdateUserRequest) GetPassword() string

func (*UpdateUserRequest) GetUsername

func (m *UpdateUserRequest) GetUsername() string

func (*UpdateUserRequest) ProtoMessage

func (*UpdateUserRequest) ProtoMessage()

func (*UpdateUserRequest) Reset

func (m *UpdateUserRequest) Reset()

func (*UpdateUserRequest) String

func (m *UpdateUserRequest) String() string

func (*UpdateUserRequest) XXX_DiscardUnknown

func (m *UpdateUserRequest) XXX_DiscardUnknown()

func (*UpdateUserRequest) XXX_Marshal

func (m *UpdateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdateUserRequest) XXX_Merge

func (m *UpdateUserRequest) XXX_Merge(src proto.Message)

func (*UpdateUserRequest) XXX_Size

func (m *UpdateUserRequest) XXX_Size() int

func (*UpdateUserRequest) XXX_Unmarshal

func (m *UpdateUserRequest) XXX_Unmarshal(b []byte) error

type UserClient

type UserClient interface {
	Find(ctx context.Context, in *FindUserRequest, opts ...grpc.CallOption) (*FindUserReply, error)
	Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserReply, error)
}

UserClient is the client API for User service.

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

func NewUserClient

func NewUserClient(cc *grpc.ClientConn) UserClient

type UserServer

type UserServer interface {
	Find(context.Context, *FindUserRequest) (*FindUserReply, error)
	Update(context.Context, *UpdateUserRequest) (*UpdateUserReply, error)
}

UserServer is the server API for User service.

Jump to

Keyboard shortcuts

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