cbsdk

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SdkMethodPost   = 1
	SdkMethodGet    = 2
	SdkMethodPut    = 3
	SdkMethodDelete = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GetParam

type GetParam struct {
	Key,
	Value string
}

type Sdk

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

func New

func New(host string, defaultHeaders map[string]string) *Sdk

func (*Sdk) AddDefaultHeader

func (a *Sdk) AddDefaultHeader(key, value string)

func (*Sdk) Create

func (a *Sdk) Create(request SdkRequest) (string, error)

type SdkRequest

type SdkRequest interface {
	GetDebug() bool
	GetHttpMethod() uint8
	GetHeader() map[string]string
	GetUri() string
	GetGet() []GetParam
	GetBody() interface{}
	GetTimeout() time.Duration
}

Jump to

Keyboard shortcuts

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