oauth

package
v0.0.0-...-0c52a1f Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Key   string `json:"key"`
	Token string `json:"token"`
}

type AuthPair

type AuthPair struct {
	Secret Auth `json:"secret"`
	Public Auth `json:"public"`
}

type Params

type Params map[string]string

func NewParams

func NewParams() Params

func (Params) Extend

func (ps Params) Extend(other Params)

func (Params) Set

func (ps Params) Set(key, val string) bool

type Request

type Request struct {
	Method, Protocol, Domain, Path string
	Query, Body                    Params
}

func NewRequest

func NewRequest(method, protocol, domain, path string, query, body Params) Request

func (Request) MakeRequest

func (or Request) MakeRequest(auth AuthPair) (*http.Request, error)

Creates a new http.Request containing an authentication header as described at https://developer.twitter.com/en/docs/authentication/oauth-1-0a/authorizing-a-request

Jump to

Keyboard shortcuts

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