user

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func RegisterServiceHandler

func RegisterServiceHandler(s server.Server, hdlr ServiceHandler, opts ...server.HandlerOption) error

Types

type Id

type Id struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*Id) Descriptor

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

func (*Id) GetId

func (m *Id) GetId() int64

func (*Id) Marshal added in v0.0.3

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

func (*Id) MarshalTo added in v0.0.3

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

func (*Id) ProtoMessage

func (*Id) ProtoMessage()

func (*Id) Reset

func (m *Id) Reset()

func (*Id) Size added in v0.0.3

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

func (*Id) String

func (m *Id) String() string

func (*Id) Unmarshal added in v0.0.3

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

func (*Id) XXX_DiscardUnknown

func (m *Id) XXX_DiscardUnknown()

func (*Id) XXX_Marshal

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

func (*Id) XXX_Merge

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

func (*Id) XXX_Size

func (m *Id) XXX_Size() int

func (*Id) XXX_Unmarshal

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

type Null

type Null struct {
}

func (*Null) Descriptor

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

func (*Null) Marshal added in v0.0.3

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

func (*Null) MarshalTo added in v0.0.3

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

func (*Null) ProtoMessage

func (*Null) ProtoMessage()

func (*Null) Reset

func (m *Null) Reset()

func (*Null) Size added in v0.0.3

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

func (*Null) String

func (m *Null) String() string

func (*Null) Unmarshal added in v0.0.3

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

func (*Null) XXX_DiscardUnknown

func (m *Null) XXX_DiscardUnknown()

func (*Null) XXX_Marshal

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

func (*Null) XXX_Merge

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

func (*Null) XXX_Size

func (m *Null) XXX_Size() int

func (*Null) XXX_Unmarshal

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

type Service

type Service interface {
	Create(ctx context.Context, in *User, opts ...client.CallOption) (*User, error)
	Update(ctx context.Context, in *User, opts ...client.CallOption) (*User, error)
	Delete(ctx context.Context, in *Id, opts ...client.CallOption) (*Null, error)
}

func NewService

func NewService(name string, c client.Client) Service

type ServiceHandler

type ServiceHandler interface {
	Create(context.Context, *User, *User) error
	Update(context.Context, *User, *User) error
	Delete(context.Context, *Id, *Null) error
}

type User

type User struct {
	Id        int64     `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Mobile    string    `protobuf:"bytes,2,opt,name=mobile,proto3" json:"mobile,omitempty"`
	Password  string    `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Salt      string    `protobuf:"bytes,4,opt,name=salt,proto3" json:"salt,omitempty"`
	Status    int32     `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"`
	CreatedAt time.Time `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"`
	UpdatedAt time.Time `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at"`
}

func (*User) Descriptor

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

func (*User) GetCreatedAt

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

func (*User) GetId

func (m *User) GetId() int64

func (*User) GetMobile

func (m *User) GetMobile() string

func (*User) GetPassword

func (m *User) GetPassword() string

func (*User) GetSalt

func (m *User) GetSalt() string

func (*User) GetStatus

func (m *User) GetStatus() int32

func (*User) GetUpdatedAt

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

func (*User) Marshal added in v0.0.3

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

func (*User) MarshalTo added in v0.0.3

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

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) Size added in v0.0.3

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

func (*User) String

func (m *User) String() string

func (*User) Unmarshal added in v0.0.3

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