provider

package
v0.0.0-...-9be93d0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AliasApiMap = map[string]string{}
View Source
var ApiProviderMap = map[string]*DataProvider{}

Functions

This section is empty.

Types

type Authorization

type Authorization struct {
	Headers map[string]string
	Query   map[string]string
	Json    map[string]string
	Body    map[string]string
}

type BaseRequest

type BaseRequest interface {
}

type BaseResponse

type BaseResponse interface {
}

type DataProvider

type DataProvider interface {
	SetServer(server string)
	Authorization() *Authorization
	Alias() map[string]string
	Api(api string, args ...[]any)
	GetRequest() BaseRequest
	Execute() BaseResponse
	SetRelation(...any)
}

type DataProviderImpl

type DataProviderImpl struct {
	Name   string
	Server string
	DataProvider
}

type Relation

type Relation struct {
	Alias      string
	Api        string
	LocalKey   string
	ForeignKey string
	Exclude    []string
	Select     []string
}

Relation `provider:"aweme_info,local:aweme_id,foreign:ids,exclude:foo,bar,select:foo,bar"`

func NewRelation

func NewRelation(r string) *Relation

Jump to

Keyboard shortcuts

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