authentication

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	Data     Data
	Endpoint string
}

type Data

type Data struct {
	TokenType   string `json:"token_type"`
	ExpiresIn   int    `json:"expires_in"`
	RequesterIP string `json:"requester_ip"`
	AccessToken string `json:"access_token"`
}

type Payload

type Payload struct {
	GrantType    string `json:"grant_type"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type Request

type Request struct {
	Method  string
	Url     string
	Headers map[string]string
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest(requestMethod, url string) Request

func (*Request) Build

func (r *Request) Build() *http.Request

func (*Request) Payload

func (r *Request) Payload(p interface{})

func (*Request) SetHeader

func (r *Request) SetHeader(key, value string)

type Response

type Response struct {
	Body       Body
	StatusCode int
}

func NewAuthenticationResponse

func NewAuthenticationResponse(resp *http.Response) *Response

Jump to

Keyboard shortcuts

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