auth

package
v0.0.0-...-36feab7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GenerateToken(in *GenerateTokenRequest) (*GenerateTokenResponse, error)
}

Client is a interface to the auth API.

func New

func New(url string) Client

New returns a new instance of Client.

type GenerateTokenRequest

type GenerateTokenRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

GenerateTokenRequest is the response body of the request.

type GenerateTokenResponse

type GenerateTokenResponse struct {
	Token   string `json:"token"`
	Expires int64  `json:"expires"`
}

GenerateTokenResponse is the response body of the request.

Jump to

Keyboard shortcuts

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