folio

package
v0.1.330 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Base   string
	Client Doer
}

API wraps a few common operations, like auth token acquisition.

func New

func New() *API

func (*API) Authenticate

func (api *API) Authenticate(username, password string) (token string, err error)

Authenticate retrieves a login token given username and plain password.

type Doer

type Doer interface {
	Do(*http.Request) (*http.Response, error)
}

Doer is implemented by HTTP clients, typically.

Jump to

Keyboard shortcuts

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