apiplatform

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiPlatform

type ApiPlatform struct {
	Config
	TokenCache
}

func NewApiPlatform

func NewApiPlatform(config Config) *ApiPlatform

NewApiPlatform 接口平台调用

func (ApiPlatform) CallApi

func (a ApiPlatform) CallApi(companyId, tagName, paramsJson string) ([]byte, error)

func (ApiPlatform) GetToken

func (a ApiPlatform) GetToken() (string, error)

type Config

type Config struct {
	Url      string `json:"url" mapstructure:"url"`
	Account  string `json:"account" mapstructure:"account"`
	Password string `json:"password" mapstructure:"password"`
}

type TokenCache

type TokenCache interface {
	Get(account string) (token string, err error)
	Set(account string, token string) (err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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