apiparams

package
v0.0.0-...-511b1a1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Login

type Login struct {
	// Operation holds the requested operation.
	Operation Operation `json:"operation"`
	// Username and Password hold traditional Juju credentials for local users.
	Username string `json:"username"`
	Password string `json:"password"`
	// Macaroons, alternatively, maps cookie URLs to macaroons used for
	// authenticating as external users. An identity manager URL/token pair is
	// usually provided.
	Macaroons map[string]macaroon.Slice `json:"macaroons"`
}

Login holds parameters for making a login request.

type Operation

type Operation string

Operation is a server operation.

const (
	OpLogin  Operation = "login"
	OpStart  Operation = "start"
	OpStatus Operation = "status"
)

OpLogin, OpStart and OpStatus hold API request operations.

type Response

type Response struct {
	// Operation holds the originally requested operation.
	Operation Operation `json:"operation"`
	// Code is the response code.
	Code ResponseCode `json:"code"`
	// Message holds an optional response message.
	Message string `json:"message"`
}

Response holds a server response.

type ResponseCode

type ResponseCode string

ResponseCode is a server response code.

const (
	OK    ResponseCode = "ok"
	Error ResponseCode = "error"
)

OK and Error hold the two possible response codes.

type Start

type Start struct {
	// Operation holds the requested operation.
	Operation Operation `json:"operation"`
}

Start holds parameters for making a start request.

Jump to

Keyboard shortcuts

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