api

package
v0.0.0-...-c61ee60 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddArticleNumRequest

type AddArticleNumRequest struct {
	UserID int64 `thrift:"user_id,1" form:"user_id" json:"user_id" query:"user_id"`
}
var ApiServiceAddArticleNumArgs_Req_DEFAULT *AddArticleNumRequest

func NewAddArticleNumRequest

func NewAddArticleNumRequest() *AddArticleNumRequest

func (*AddArticleNumRequest) GetUserID

func (p *AddArticleNumRequest) GetUserID() (v int64)

func (*AddArticleNumRequest) Read

func (p *AddArticleNumRequest) Read(iprot thrift.TProtocol) (err error)

func (*AddArticleNumRequest) ReadField1

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

func (*AddArticleNumRequest) String

func (p *AddArticleNumRequest) String() string

func (*AddArticleNumRequest) Write

func (p *AddArticleNumRequest) Write(oprot thrift.TProtocol) (err error)

type AddArticleNumResponse

type AddArticleNumResponse struct {
}
var ApiServiceAddArticleNumResult_Success_DEFAULT *AddArticleNumResponse

func NewAddArticleNumResponse

func NewAddArticleNumResponse() *AddArticleNumResponse

func (*AddArticleNumResponse) Read

func (p *AddArticleNumResponse) Read(iprot thrift.TProtocol) (err error)

func (*AddArticleNumResponse) String

func (p *AddArticleNumResponse) String() string

func (*AddArticleNumResponse) Write

func (p *AddArticleNumResponse) Write(oprot thrift.TProtocol) (err error)

type ApiService

type ApiService interface {
	Register(ctx context.Context, req *RegisterRequest) (r *ResgisterResponse, err error)

	Login(ctx context.Context, req *LoginRequest) (r *LoginResponse, err error)

	GetArticleNum(ctx context.Context, req *GetArticleNumRequest) (r *GetArticleNumResponse, err error)

	AddArticleNum(ctx context.Context, req *AddArticleNumRequest) (r *AddArticleNumResponse, err error)

	PostArticle(ctx context.Context, req *PostArticleRequest) (r *PostArticleResponse, err error)
}

type ApiServiceAddArticleNumArgs

type ApiServiceAddArticleNumArgs struct {
	Req *AddArticleNumRequest `thrift:"req,1"`
}

func NewApiServiceAddArticleNumArgs

func NewApiServiceAddArticleNumArgs() *ApiServiceAddArticleNumArgs

func (*ApiServiceAddArticleNumArgs) GetReq

func (*ApiServiceAddArticleNumArgs) IsSetReq

func (p *ApiServiceAddArticleNumArgs) IsSetReq() bool

func (*ApiServiceAddArticleNumArgs) Read

func (p *ApiServiceAddArticleNumArgs) Read(iprot thrift.TProtocol) (err error)

func (*ApiServiceAddArticleNumArgs) ReadField1

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

func (*ApiServiceAddArticleNumArgs) String

func (p *ApiServiceAddArticleNumArgs) String() string

func (*ApiServiceAddArticleNumArgs) Write

func (p *ApiServiceAddArticleNumArgs) Write(oprot thrift.TProtocol) (err error)

type ApiServiceAddArticleNumResult

type ApiServiceAddArticleNumResult struct {
	Success *AddArticleNumResponse `thrift:"success,0,optional"`
}

func NewApiServiceAddArticleNumResult

func NewApiServiceAddArticleNumResult() *ApiServiceAddArticleNumResult

func (*ApiServiceAddArticleNumResult) GetSuccess

func (*ApiServiceAddArticleNumResult) IsSetSuccess

func (p *ApiServiceAddArticleNumResult) IsSetSuccess() bool

func (*ApiServiceAddArticleNumResult) Read

func (p *ApiServiceAddArticleNumResult) Read(iprot thrift.TProtocol) (err error)

func (*ApiServiceAddArticleNumResult) ReadField0

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

func (*ApiServiceAddArticleNumResult) String

func (*ApiServiceAddArticleNumResult) Write

func (p *ApiServiceAddArticleNumResult) Write(oprot thrift.TProtocol) (err error)

type ApiServiceClient

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

func NewApiServiceClient

func NewApiServiceClient(c thrift.TClient) *ApiServiceClient

func NewApiServiceClientProtocol

func NewApiServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *ApiServiceClient

func (*ApiServiceClient) AddArticleNum

func (p *ApiServiceClient) AddArticleNum(ctx context.Context, req *AddArticleNumRequest) (r *AddArticleNumResponse, err error)

func (*ApiServiceClient) Client_

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

func (*ApiServiceClient) GetArticleNum

func (p *ApiServiceClient) GetArticleNum(ctx context.Context, req *GetArticleNumRequest) (r *GetArticleNumResponse, err error)

func (*ApiServiceClient) Login

func (p *ApiServiceClient) Login(ctx context.Context, req *LoginRequest) (r *LoginResponse, err error)

func (*ApiServiceClient) PostArticle

func (p *ApiServiceClient) PostArticle(ctx context.Context, req *PostArticleRequest) (r *PostArticleResponse, err error)

func (*ApiServiceClient) Register

func (p *ApiServiceClient) Register(ctx context.Context, req *RegisterRequest) (r *ResgisterResponse, err error)

type ApiServiceGetArticleNumArgs

type ApiServiceGetArticleNumArgs struct {
	Req *GetArticleNumRequest `thrift:"req,1"`
}

func NewApiServiceGetArticleNumArgs

func NewApiServiceGetArticleNumArgs() *ApiServiceGetArticleNumArgs

func (*ApiServiceGetArticleNumArgs) GetReq

func (*ApiServiceGetArticleNumArgs) IsSetReq

func (p *ApiServiceGetArticleNumArgs) IsSetReq() bool

func (*ApiServiceGetArticleNumArgs) Read

func (p *ApiServiceGetArticleNumArgs) Read(iprot thrift.TProtocol) (err error)

func (*ApiServiceGetArticleNumArgs) ReadField1

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

func (*ApiServiceGetArticleNumArgs) String

func (p *ApiServiceGetArticleNumArgs) String() string

func (*ApiServiceGetArticleNumArgs) Write

func (p *ApiServiceGetArticleNumArgs) Write(oprot thrift.TProtocol) (err error)

type ApiServiceGetArticleNumResult

type ApiServiceGetArticleNumResult struct {
	Success *GetArticleNumResponse `thrift:"success,0,optional"`
}

func NewApiServiceGetArticleNumResult

func NewApiServiceGetArticleNumResult() *ApiServiceGetArticleNumResult

func (*ApiServiceGetArticleNumResult) GetSuccess

func (*ApiServiceGetArticleNumResult) IsSetSuccess

func (p *ApiServiceGetArticleNumResult) IsSetSuccess() bool

func (*ApiServiceGetArticleNumResult) Read

func (p *ApiServiceGetArticleNumResult) Read(iprot thrift.TProtocol) (err error)

func (*ApiServiceGetArticleNumResult) ReadField0

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

func (*ApiServiceGetArticleNumResult) String

func (*ApiServiceGetArticleNumResult) Write

func (p *ApiServiceGetArticleNumResult) Write(oprot thrift.TProtocol) (err error)

type ApiServiceLoginArgs

type ApiServiceLoginArgs struct {
	Req *LoginRequest `thrift:"req,1"`
}

func NewApiServiceLoginArgs

func NewApiServiceLoginArgs() *ApiServiceLoginArgs

func (*ApiServiceLoginArgs) GetReq

func (p *ApiServiceLoginArgs) GetReq() (v *LoginRequest)

func (*ApiServiceLoginArgs) IsSetReq

func (p *ApiServiceLoginArgs) IsSetReq() bool

func (*ApiServiceLoginArgs) Read

func (p *ApiServiceLoginArgs) Read(iprot thrift.TProtocol) (err error)

func (*ApiServiceLoginArgs) ReadField1

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

func (*ApiServiceLoginArgs) String

func (p *ApiServiceLoginArgs) String() string

func (*ApiServiceLoginArgs) Write

func (p *ApiServiceLoginArgs) Write(oprot thrift.TProtocol) (err error)

type ApiServiceLoginResult

type ApiServiceLoginResult struct {
	Success *LoginResponse `thrift:"success,0,optional"`
}

func NewApiServiceLoginResult

func NewApiServiceLoginResult() *ApiServiceLoginResult

func (*ApiServiceLoginResult) GetSuccess

func (p *ApiServiceLoginResult) GetSuccess() (v *LoginResponse)

func (*ApiServiceLoginResult) IsSetSuccess

func (p *ApiServiceLoginResult) IsSetSuccess() bool

func (*ApiServiceLoginResult) Read

func (p *ApiServiceLoginResult) Read(iprot thrift.TProtocol) (err error)

func (*ApiServiceLoginResult) ReadField0

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

func (*ApiServiceLoginResult) String

func (p *ApiServiceLoginResult) String() string

func (*ApiServiceLoginResult) Write

func (p *ApiServiceLoginResult) Write(oprot thrift.TProtocol) (err error)

type ApiServicePostArticleArgs

type ApiServicePostArticleArgs struct {
	Req *PostArticleRequest `thrift:"req,1"`
}

func NewApiServicePostArticleArgs

func NewApiServicePostArticleArgs() *ApiServicePostArticleArgs

func (*ApiServicePostArticleArgs) GetReq

func (*ApiServicePostArticleArgs) IsSetReq

func (p *ApiServicePostArticleArgs) IsSetReq() bool

func (*ApiServicePostArticleArgs) Read

func (p *ApiServicePostArticleArgs) Read(iprot thrift.TProtocol) (err error)

func (*ApiServicePostArticleArgs) ReadField1

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

func (*ApiServicePostArticleArgs) String

func (p *ApiServicePostArticleArgs) String() string

func (*ApiServicePostArticleArgs) Write

func (p *ApiServicePostArticleArgs) Write(oprot thrift.TProtocol) (err error)

type ApiServicePostArticleResult

type ApiServicePostArticleResult struct {
	Success *PostArticleResponse `thrift:"success,0,optional"`
}

func NewApiServicePostArticleResult

func NewApiServicePostArticleResult() *ApiServicePostArticleResult

func (*ApiServicePostArticleResult) GetSuccess

func (p *ApiServicePostArticleResult) GetSuccess() (v *PostArticleResponse)

func (*ApiServicePostArticleResult) IsSetSuccess

func (p *ApiServicePostArticleResult) IsSetSuccess() bool

func (*ApiServicePostArticleResult) Read

func (p *ApiServicePostArticleResult) Read(iprot thrift.TProtocol) (err error)

func (*ApiServicePostArticleResult) ReadField0

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

func (*ApiServicePostArticleResult) String

func (p *ApiServicePostArticleResult) String() string

func (*ApiServicePostArticleResult) Write

func (p *ApiServicePostArticleResult) Write(oprot thrift.TProtocol) (err error)

type ApiServiceProcessor

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

func NewApiServiceProcessor

func NewApiServiceProcessor(handler ApiService) *ApiServiceProcessor

func (*ApiServiceProcessor) AddToProcessorMap

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

func (*ApiServiceProcessor) GetProcessorFunction

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

func (*ApiServiceProcessor) Process

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

func (*ApiServiceProcessor) ProcessorMap

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

type ApiServiceRegisterArgs

type ApiServiceRegisterArgs struct {
	Req *RegisterRequest `thrift:"req,1"`
}

func NewApiServiceRegisterArgs

func NewApiServiceRegisterArgs() *ApiServiceRegisterArgs

func (*ApiServiceRegisterArgs) GetReq

func (p *ApiServiceRegisterArgs) GetReq() (v *RegisterRequest)

func (*ApiServiceRegisterArgs) IsSetReq

func (p *ApiServiceRegisterArgs) IsSetReq() bool

func (*ApiServiceRegisterArgs) Read

func (p *ApiServiceRegisterArgs) Read(iprot thrift.TProtocol) (err error)

func (*ApiServiceRegisterArgs) ReadField1

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

func (*ApiServiceRegisterArgs) String

func (p *ApiServiceRegisterArgs) String() string

func (*ApiServiceRegisterArgs) Write

func (p *ApiServiceRegisterArgs) Write(oprot thrift.TProtocol) (err error)

type ApiServiceRegisterResult

type ApiServiceRegisterResult struct {
	Success *ResgisterResponse `thrift:"success,0,optional"`
}

func NewApiServiceRegisterResult

func NewApiServiceRegisterResult() *ApiServiceRegisterResult

func (*ApiServiceRegisterResult) GetSuccess

func (p *ApiServiceRegisterResult) GetSuccess() (v *ResgisterResponse)

func (*ApiServiceRegisterResult) IsSetSuccess

func (p *ApiServiceRegisterResult) IsSetSuccess() bool

func (*ApiServiceRegisterResult) Read

func (p *ApiServiceRegisterResult) Read(iprot thrift.TProtocol) (err error)

func (*ApiServiceRegisterResult) ReadField0

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

func (*ApiServiceRegisterResult) String

func (p *ApiServiceRegisterResult) String() string

func (*ApiServiceRegisterResult) Write

func (p *ApiServiceRegisterResult) Write(oprot thrift.TProtocol) (err error)

type GetArticleNumRequest

type GetArticleNumRequest struct {
	UserID int64 `thrift:"user_id,1" form:"user_id" json:"user_id" query:"user_id"`
}
var ApiServiceGetArticleNumArgs_Req_DEFAULT *GetArticleNumRequest

func NewGetArticleNumRequest

func NewGetArticleNumRequest() *GetArticleNumRequest

func (*GetArticleNumRequest) GetUserID

func (p *GetArticleNumRequest) GetUserID() (v int64)

func (*GetArticleNumRequest) Read

func (p *GetArticleNumRequest) Read(iprot thrift.TProtocol) (err error)

func (*GetArticleNumRequest) ReadField1

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

func (*GetArticleNumRequest) String

func (p *GetArticleNumRequest) String() string

func (*GetArticleNumRequest) Write

func (p *GetArticleNumRequest) Write(oprot thrift.TProtocol) (err error)

type GetArticleNumResponse

type GetArticleNumResponse struct {
	Num int64 `thrift:"num,1" form:"num" json:"num" query:"num"`
}
var ApiServiceGetArticleNumResult_Success_DEFAULT *GetArticleNumResponse

func NewGetArticleNumResponse

func NewGetArticleNumResponse() *GetArticleNumResponse

func (*GetArticleNumResponse) GetNum

func (p *GetArticleNumResponse) GetNum() (v int64)

func (*GetArticleNumResponse) Read

func (p *GetArticleNumResponse) Read(iprot thrift.TProtocol) (err error)

func (*GetArticleNumResponse) ReadField1

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

func (*GetArticleNumResponse) String

func (p *GetArticleNumResponse) String() string

func (*GetArticleNumResponse) Write

func (p *GetArticleNumResponse) Write(oprot thrift.TProtocol) (err error)

type LoginRequest

type LoginRequest struct {
	Username string `thrift:"username,1" form:"username" json:"username" query:"username"`
	Password string `thrift:"password,2" form:"password" json:"password" query:"password"`
}
var ApiServiceLoginArgs_Req_DEFAULT *LoginRequest

func NewLoginRequest

func NewLoginRequest() *LoginRequest

func (*LoginRequest) GetPassword

func (p *LoginRequest) GetPassword() (v string)

func (*LoginRequest) GetUsername

func (p *LoginRequest) GetUsername() (v string)

func (*LoginRequest) Read

func (p *LoginRequest) Read(iprot thrift.TProtocol) (err error)

func (*LoginRequest) ReadField1

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

func (*LoginRequest) ReadField2

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

func (*LoginRequest) String

func (p *LoginRequest) String() string

func (*LoginRequest) Write

func (p *LoginRequest) Write(oprot thrift.TProtocol) (err error)

type LoginResponse

type LoginResponse struct {
	Token string `thrift:"token,1" form:"token" json:"token" query:"token"`
}
var ApiServiceLoginResult_Success_DEFAULT *LoginResponse

func NewLoginResponse

func NewLoginResponse() *LoginResponse

func (*LoginResponse) GetToken

func (p *LoginResponse) GetToken() (v string)

func (*LoginResponse) Read

func (p *LoginResponse) Read(iprot thrift.TProtocol) (err error)

func (*LoginResponse) ReadField1

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

func (*LoginResponse) String

func (p *LoginResponse) String() string

func (*LoginResponse) Write

func (p *LoginResponse) Write(oprot thrift.TProtocol) (err error)

type PostArticleRequest

type PostArticleRequest struct {
	Title   string `thrift:"title,1" form:"title" json:"title" query:"title"`
	Content string `thrift:"content,2" form:"content" json:"content" query:"content"`
}

Article

var ApiServicePostArticleArgs_Req_DEFAULT *PostArticleRequest

func NewPostArticleRequest

func NewPostArticleRequest() *PostArticleRequest

func (*PostArticleRequest) GetContent

func (p *PostArticleRequest) GetContent() (v string)

func (*PostArticleRequest) GetTitle

func (p *PostArticleRequest) GetTitle() (v string)

func (*PostArticleRequest) Read

func (p *PostArticleRequest) Read(iprot thrift.TProtocol) (err error)

func (*PostArticleRequest) ReadField1

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

func (*PostArticleRequest) ReadField2

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

func (*PostArticleRequest) String

func (p *PostArticleRequest) String() string

func (*PostArticleRequest) Write

func (p *PostArticleRequest) Write(oprot thrift.TProtocol) (err error)

type PostArticleResponse

type PostArticleResponse struct {
}
var ApiServicePostArticleResult_Success_DEFAULT *PostArticleResponse

func NewPostArticleResponse

func NewPostArticleResponse() *PostArticleResponse

func (*PostArticleResponse) Read

func (p *PostArticleResponse) Read(iprot thrift.TProtocol) (err error)

func (*PostArticleResponse) String

func (p *PostArticleResponse) String() string

func (*PostArticleResponse) Write

func (p *PostArticleResponse) Write(oprot thrift.TProtocol) (err error)

type RegisterRequest

type RegisterRequest struct {
	Username string `thrift:"username,1" form:"username" json:"username" query:"username"`
	Password string `thrift:"password,2" form:"password" json:"password" query:"password"`
}

User

var ApiServiceRegisterArgs_Req_DEFAULT *RegisterRequest

func NewRegisterRequest

func NewRegisterRequest() *RegisterRequest

func (*RegisterRequest) GetPassword

func (p *RegisterRequest) GetPassword() (v string)

func (*RegisterRequest) GetUsername

func (p *RegisterRequest) GetUsername() (v string)

func (*RegisterRequest) Read

func (p *RegisterRequest) Read(iprot thrift.TProtocol) (err error)

func (*RegisterRequest) ReadField1

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

func (*RegisterRequest) ReadField2

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

func (*RegisterRequest) String

func (p *RegisterRequest) String() string

func (*RegisterRequest) Write

func (p *RegisterRequest) Write(oprot thrift.TProtocol) (err error)

type ResgisterResponse

type ResgisterResponse struct {
	Token string `thrift:"token,1" form:"token" json:"token" query:"token"`
}
var ApiServiceRegisterResult_Success_DEFAULT *ResgisterResponse

func NewResgisterResponse

func NewResgisterResponse() *ResgisterResponse

func (*ResgisterResponse) GetToken

func (p *ResgisterResponse) GetToken() (v string)

func (*ResgisterResponse) Read

func (p *ResgisterResponse) Read(iprot thrift.TProtocol) (err error)

func (*ResgisterResponse) ReadField1

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

func (*ResgisterResponse) String

func (p *ResgisterResponse) String() string

func (*ResgisterResponse) Write

func (p *ResgisterResponse) Write(oprot thrift.TProtocol) (err error)

Jump to

Keyboard shortcuts

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