client

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSuccess

func IsSuccess(message string) bool

IsSuccess check ele api is success.

func UUID4

func UUID4() string

UUID4 is generate uuid

Types

type App

type App struct {
	Key    string
	Secret string
}

App bilibili intranet authorization.

type Config

type Config struct {
	*App
}

Config is http client conf.

type EleClient

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

EleClient client is http client, for third ele server.

func NewEleClient

func NewEleClient(c *Config, client *bm.Client) *EleClient

NewEleClient new a http client.

func (*EleClient) Get

func (cl *EleClient) Get(c context.Context, host, path string, args interface{}, res interface{}) (err error)

Get a json req http get.

func (*EleClient) Post

func (cl *EleClient) Post(c context.Context, host, path string, args interface{}, res interface{}) (err error)

Post a json req http post.

Jump to

Keyboard shortcuts

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