model

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

View Source
const (
	BASE_URL             = "https://sapi.ads.heytapmobi.com"
	DEFAULT_VERSION      = "v1"
	DEFAULT_CONTENT_TYPE = "application/json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRequest

type BaseRequest struct {
	OwnerID uint64 `json:"ownerId,omitempty"`
	// contains filtered or unexported fields
}

func (BaseRequest) GetBaseUrl

func (r BaseRequest) GetBaseUrl() string

func (BaseRequest) GetContentType

func (r BaseRequest) GetContentType() string

func (BaseRequest) GetOwnerID

func (r BaseRequest) GetOwnerID() uint64

func (BaseRequest) GetVersion

func (r BaseRequest) GetVersion() string

func (BaseRequest) ResourceAction

func (r BaseRequest) ResourceAction() string

func (BaseRequest) ResourceName

func (r BaseRequest) ResourceName() string

func (*BaseRequest) SetBaseUrl

func (r *BaseRequest) SetBaseUrl(baseUrl string)

func (*BaseRequest) SetContentType

func (r *BaseRequest) SetContentType(contentType string)

func (*BaseRequest) SetOwnerID

func (r *BaseRequest) SetOwnerID(ownerID uint64)

func (*BaseRequest) SetResourceAction

func (r *BaseRequest) SetResourceAction(resourceAction string)

func (*BaseRequest) SetResourceName

func (r *BaseRequest) SetResourceName(resourceName string)

func (*BaseRequest) SetVersion

func (r *BaseRequest) SetVersion(ver string)

type BaseResponse

type BaseResponse struct {
	Code int    `json:"code,omitempty"`
	Msg  string `json:"msg,omitempty"`
}

func (BaseResponse) Error

func (r BaseResponse) Error() string

func (BaseResponse) IsError

func (r BaseResponse) IsError() bool

type Request

type Request interface {
	GetOwnerID() uint64
	GetBaseUrl() string
	GetVersion() string
	GetContentType() string
	ResourceName() string
	ResourceAction() string
}

type Response

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

Directories

Path Synopsis
communal

Jump to

Keyboard shortcuts

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