ninshou

package
v0.0.0-...-5bbb7b8 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthNinshou = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNinshou   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterNinshouServer

func RegisterNinshouServer(s *grpc.Server, srv NinshouServer)

Types

type Client

type Client struct {
	grpc.Client
	NinshouClient
}

Client is the client to the Ninshou gRPC service.

func NewClient

func NewClient(config *grpc.ClientConfig) *Client

NewClient returns a client to the Ninshou gRPC service.

type NinshouClient

type NinshouClient interface {
	CreateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error)
	GetUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error)
}

NinshouClient is the client API for Ninshou service.

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

func NewNinshouClient

func NewNinshouClient(cc *grpc.ClientConn) NinshouClient

type NinshouServer

type NinshouServer interface {
	CreateUser(context.Context, *User) (*User, error)
	GetUser(context.Context, *User) (*User, error)
}

NinshouServer is the server API for Ninshou service.

type User

type User struct {
	Id        *common.UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id"`
	Name      string       `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Email     string       `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	CreatedAt *time.Time   `protobuf:"bytes,4,opt,name=createdAt,proto3,stdtime" json:"createdAt,omitempty"`
	UpdatedAt *time.Time   `protobuf:"bytes,5,opt,name=updatedAt,proto3,stdtime" json:"updatedAt,omitempty"`
	DeletedAt *time.Time   `protobuf:"bytes,6,opt,name=deletedAt,proto3,stdtime" json:"deletedAt,omitempty"`
}

func (*User) Descriptor

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

func (*User) GetCreatedAt

func (m *User) GetCreatedAt() *time.Time

func (*User) GetDeletedAt

func (m *User) GetDeletedAt() *time.Time

func (*User) GetEmail

func (m *User) GetEmail() string

func (*User) GetId

func (m *User) GetId() *common.UUID

func (*User) GetName

func (m *User) GetName() string

func (*User) GetUpdatedAt

func (m *User) GetUpdatedAt() *time.Time

func (*User) Marshal

func (m *User) Marshal() (dAtA []byte, err error)

func (*User) MarshalTo

func (m *User) MarshalTo(dAtA []byte) (int, error)

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) Size

func (m *User) Size() (n int)

func (*User) String

func (m *User) String() string

func (*User) Unmarshal

func (m *User) Unmarshal(dAtA []byte) error

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

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

func (*User) XXX_Merge

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

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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