model

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 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 BaseRequest

type BaseRequest struct {
	Endpoint string
}

func (BaseRequest) GetEndpoint

func (r BaseRequest) GetEndpoint() string

func (BaseRequest) GetFileFieldName

func (r BaseRequest) GetFileFieldName() string

type BaseResponse

type BaseResponse struct {
	Result int    `json:"result,omitempty"`
	ErrMsg string `json:"error_msg,omitempty"`
}

func (BaseResponse) Error

func (r BaseResponse) Error() string

func (BaseResponse) IsError

func (r BaseResponse) IsError() bool

type FormRequest

type FormRequest interface {
	GetScope() string
	GetParams() url.Values
	GetData() map[string]string
	GetEndpoint() string
}

type GetRequest

type GetRequest interface {
	GetScope() string
	GetParams() url.Values
	GetEndpoint() string
}

type PostRequest

type PostRequest interface {
	GetScope() string
	GetParams() url.Values
	GetEndpoint() string
	GetData() []byte
}

type Response

type Response interface {
	IsError() bool
	Error() string
}

type UploadDataRequest

type UploadDataRequest interface {
	GetScope() string
	GetParams() url.Values
	GetData() []byte
	GetContentType() string
	GetEndpoint() string
}

type UploadRequest

type UploadRequest interface {
	GetScope() string
	GetParams() url.Values
	GetData() map[string]string
	GetFile() *os.File
	GetFileFieldName() string
	GetEndpoint() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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