conf

package
v0.0.0-...-85f63e2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdConfig

type AdConfig struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	ApiVersion    string            `json:"apiVersion,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`

	HTTPClient   *http.Client
	IsDebug      bool
	GlobalConfig GlobalConfig
	// contains filtered or unexported fields
}

func NewAdConfig

func NewAdConfig(debug bool) *AdConfig

func (*AdConfig) AddDefaultHeader

func (c *AdConfig) AddDefaultHeader(key string, value string)

func (*AdConfig) GetAccessToken

func (c *AdConfig) GetAccessToken() string

func (*AdConfig) SetAccessToken

func (c *AdConfig) SetAccessToken(token string)

func (*AdConfig) SetUserAgent

func (c *AdConfig) SetUserAgent(userAgent string)

type GlobalConfig

type GlobalConfig struct {
	ServiceName ServiceName
	HttpOption  HttpOption
}

type HttpOption

type HttpOption struct {
	Header http.Header
}

type ServiceName

type ServiceName struct {
	Name   string
	Schema string
}

Jump to

Keyboard shortcuts

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