user

package
v0.0.0-...-a033ef5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int

Functions

This section is empty.

Types

type Account

type Account struct {
	ID      string `thrift:"ID,1,required" db:"ID" json:"ID"`
	AlterID int32  `thrift:"AlterID,2,required" db:"AlterID" json:"AlterID"`
}

Attributes:

  • ID
  • AlterID
var MemoryUser_Account_DEFAULT *Account

func NewAccount

func NewAccount() *Account

func (*Account) GetAlterID

func (p *Account) GetAlterID() int32

func (*Account) GetID

func (p *Account) GetID() string

func (*Account) Read

func (p *Account) Read(iprot thrift.TProtocol) error

func (*Account) ReadField1

func (p *Account) ReadField1(iprot thrift.TProtocol) error

func (*Account) ReadField2

func (p *Account) ReadField2(iprot thrift.TProtocol) error

func (*Account) String

func (p *Account) String() string

func (*Account) Write

func (p *Account) Write(oprot thrift.TProtocol) error

type GetUserResponse

type GetUserResponse struct {
	User  *MemoryUser `thrift:"User,1,required" db:"User" json:"User"`
	Time  int64       `thrift:"Time,2,required" db:"Time" json:"Time"`
	Found bool        `thrift:"Found,3,required" db:"Found" json:"Found"`
}

Attributes:

  • User
  • Time
  • Found
var UserSvcGetResult_Success_DEFAULT *GetUserResponse

func NewGetUserResponse

func NewGetUserResponse() *GetUserResponse

func (*GetUserResponse) GetFound

func (p *GetUserResponse) GetFound() bool

func (*GetUserResponse) GetTime

func (p *GetUserResponse) GetTime() int64

func (*GetUserResponse) GetUser

func (p *GetUserResponse) GetUser() *MemoryUser

func (*GetUserResponse) IsSetUser

func (p *GetUserResponse) IsSetUser() bool

func (*GetUserResponse) Read

func (p *GetUserResponse) Read(iprot thrift.TProtocol) error

func (*GetUserResponse) ReadField1

func (p *GetUserResponse) ReadField1(iprot thrift.TProtocol) error

func (*GetUserResponse) ReadField2

func (p *GetUserResponse) ReadField2(iprot thrift.TProtocol) error

func (*GetUserResponse) ReadField3

func (p *GetUserResponse) ReadField3(iprot thrift.TProtocol) error

func (*GetUserResponse) String

func (p *GetUserResponse) String() string

func (*GetUserResponse) Write

func (p *GetUserResponse) Write(oprot thrift.TProtocol) error

type MemoryUser

type MemoryUser struct {
	Email   string   `thrift:"Email,1,required" db:"Email" json:"Email"`
	Level   int32    `thrift:"Level,2,required" db:"Level" json:"Level"`
	Account *Account `thrift:"Account,3,required" db:"Account" json:"Account"`
}

Attributes:

  • Email
  • Level
  • Account
var GetUserResponse_User_DEFAULT *MemoryUser
var UserSvcAddArgs_U_DEFAULT *MemoryUser

func NewMemoryUser

func NewMemoryUser() *MemoryUser

func (*MemoryUser) GetAccount

func (p *MemoryUser) GetAccount() *Account

func (*MemoryUser) GetEmail

func (p *MemoryUser) GetEmail() string

func (*MemoryUser) GetLevel

func (p *MemoryUser) GetLevel() int32

func (*MemoryUser) IsSetAccount

func (p *MemoryUser) IsSetAccount() bool

func (*MemoryUser) Read

func (p *MemoryUser) Read(iprot thrift.TProtocol) error

func (*MemoryUser) ReadField1

func (p *MemoryUser) ReadField1(iprot thrift.TProtocol) error

func (*MemoryUser) ReadField2

func (p *MemoryUser) ReadField2(iprot thrift.TProtocol) error

func (*MemoryUser) ReadField3

func (p *MemoryUser) ReadField3(iprot thrift.TProtocol) error

func (*MemoryUser) String

func (p *MemoryUser) String() string

func (*MemoryUser) Write

func (p *MemoryUser) Write(oprot thrift.TProtocol) error

type UserSvc

type UserSvc interface {
	// Parameters:
	//  - U
	Add(ctx context.Context, u *MemoryUser) (err error)
	Close(ctx context.Context) (err error)
	// Parameters:
	//  - UserHash
	Get(ctx context.Context, userHash []byte) (r *GetUserResponse, err error)
	// Parameters:
	//  - Email
	Remove(ctx context.Context, email string) (err error)
}

type UserSvcAddArgs

type UserSvcAddArgs struct {
	U *MemoryUser `thrift:"u,1" db:"u" json:"u"`
}

Attributes:

  • U

func NewUserSvcAddArgs

func NewUserSvcAddArgs() *UserSvcAddArgs

func (*UserSvcAddArgs) GetU

func (p *UserSvcAddArgs) GetU() *MemoryUser

func (*UserSvcAddArgs) IsSetU

func (p *UserSvcAddArgs) IsSetU() bool

func (*UserSvcAddArgs) Read

func (p *UserSvcAddArgs) Read(iprot thrift.TProtocol) error

func (*UserSvcAddArgs) ReadField1

func (p *UserSvcAddArgs) ReadField1(iprot thrift.TProtocol) error

func (*UserSvcAddArgs) String

func (p *UserSvcAddArgs) String() string

func (*UserSvcAddArgs) Write

func (p *UserSvcAddArgs) Write(oprot thrift.TProtocol) error

type UserSvcAddResult

type UserSvcAddResult struct {
}

func NewUserSvcAddResult

func NewUserSvcAddResult() *UserSvcAddResult

func (*UserSvcAddResult) Read

func (p *UserSvcAddResult) Read(iprot thrift.TProtocol) error

func (*UserSvcAddResult) String

func (p *UserSvcAddResult) String() string

func (*UserSvcAddResult) Write

func (p *UserSvcAddResult) Write(oprot thrift.TProtocol) error

type UserSvcClient

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

func NewUserSvcClient

func NewUserSvcClient(c thrift.TClient) *UserSvcClient

func NewUserSvcClientProtocol

func NewUserSvcClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *UserSvcClient

func (*UserSvcClient) Add

func (p *UserSvcClient) Add(ctx context.Context, u *MemoryUser) (err error)

Parameters:

  • U

func (*UserSvcClient) Client_

func (p *UserSvcClient) Client_() thrift.TClient

func (*UserSvcClient) Close

func (p *UserSvcClient) Close(ctx context.Context) (err error)

func (*UserSvcClient) Get

func (p *UserSvcClient) Get(ctx context.Context, userHash []byte) (r *GetUserResponse, err error)

Parameters:

  • UserHash

func (*UserSvcClient) Remove

func (p *UserSvcClient) Remove(ctx context.Context, email string) (err error)

Parameters:

  • Email

type UserSvcCloseArgs

type UserSvcCloseArgs struct {
}

func NewUserSvcCloseArgs

func NewUserSvcCloseArgs() *UserSvcCloseArgs

func (*UserSvcCloseArgs) Read

func (p *UserSvcCloseArgs) Read(iprot thrift.TProtocol) error

func (*UserSvcCloseArgs) String

func (p *UserSvcCloseArgs) String() string

func (*UserSvcCloseArgs) Write

func (p *UserSvcCloseArgs) Write(oprot thrift.TProtocol) error

type UserSvcCloseResult

type UserSvcCloseResult struct {
}

func NewUserSvcCloseResult

func NewUserSvcCloseResult() *UserSvcCloseResult

func (*UserSvcCloseResult) Read

func (p *UserSvcCloseResult) Read(iprot thrift.TProtocol) error

func (*UserSvcCloseResult) String

func (p *UserSvcCloseResult) String() string

func (*UserSvcCloseResult) Write

func (p *UserSvcCloseResult) Write(oprot thrift.TProtocol) error

type UserSvcGetArgs

type UserSvcGetArgs struct {
	UserHash []byte `thrift:"userHash,1" db:"userHash" json:"userHash"`
}

Attributes:

  • UserHash

func NewUserSvcGetArgs

func NewUserSvcGetArgs() *UserSvcGetArgs

func (*UserSvcGetArgs) GetUserHash

func (p *UserSvcGetArgs) GetUserHash() []byte

func (*UserSvcGetArgs) Read

func (p *UserSvcGetArgs) Read(iprot thrift.TProtocol) error

func (*UserSvcGetArgs) ReadField1

func (p *UserSvcGetArgs) ReadField1(iprot thrift.TProtocol) error

func (*UserSvcGetArgs) String

func (p *UserSvcGetArgs) String() string

func (*UserSvcGetArgs) Write

func (p *UserSvcGetArgs) Write(oprot thrift.TProtocol) error

type UserSvcGetResult

type UserSvcGetResult struct {
	Success *GetUserResponse `thrift:"success,0" db:"success" json:"success,omitempty"`
}

Attributes:

  • Success

func NewUserSvcGetResult

func NewUserSvcGetResult() *UserSvcGetResult

func (*UserSvcGetResult) GetSuccess

func (p *UserSvcGetResult) GetSuccess() *GetUserResponse

func (*UserSvcGetResult) IsSetSuccess

func (p *UserSvcGetResult) IsSetSuccess() bool

func (*UserSvcGetResult) Read

func (p *UserSvcGetResult) Read(iprot thrift.TProtocol) error

func (*UserSvcGetResult) ReadField0

func (p *UserSvcGetResult) ReadField0(iprot thrift.TProtocol) error

func (*UserSvcGetResult) String

func (p *UserSvcGetResult) String() string

func (*UserSvcGetResult) Write

func (p *UserSvcGetResult) Write(oprot thrift.TProtocol) error

type UserSvcProcessor

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

func NewUserSvcProcessor

func NewUserSvcProcessor(handler UserSvc) *UserSvcProcessor

func (*UserSvcProcessor) AddToProcessorMap

func (p *UserSvcProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*UserSvcProcessor) GetProcessorFunction

func (p *UserSvcProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*UserSvcProcessor) Process

func (p *UserSvcProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*UserSvcProcessor) ProcessorMap

func (p *UserSvcProcessor) ProcessorMap() map[string]thrift.TProcessorFunction

type UserSvcRemoveArgs

type UserSvcRemoveArgs struct {
	Email string `thrift:"email,1" db:"email" json:"email"`
}

Attributes:

  • Email

func NewUserSvcRemoveArgs

func NewUserSvcRemoveArgs() *UserSvcRemoveArgs

func (*UserSvcRemoveArgs) GetEmail

func (p *UserSvcRemoveArgs) GetEmail() string

func (*UserSvcRemoveArgs) Read

func (p *UserSvcRemoveArgs) Read(iprot thrift.TProtocol) error

func (*UserSvcRemoveArgs) ReadField1

func (p *UserSvcRemoveArgs) ReadField1(iprot thrift.TProtocol) error

func (*UserSvcRemoveArgs) String

func (p *UserSvcRemoveArgs) String() string

func (*UserSvcRemoveArgs) Write

func (p *UserSvcRemoveArgs) Write(oprot thrift.TProtocol) error

type UserSvcRemoveResult

type UserSvcRemoveResult struct {
}

func NewUserSvcRemoveResult

func NewUserSvcRemoveResult() *UserSvcRemoveResult

func (*UserSvcRemoveResult) Read

func (p *UserSvcRemoveResult) Read(iprot thrift.TProtocol) error

func (*UserSvcRemoveResult) String

func (p *UserSvcRemoveResult) String() string

func (*UserSvcRemoveResult) Write

func (p *UserSvcRemoveResult) Write(oprot thrift.TProtocol) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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