admiral

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: Apache-2.0 Imports: 16 Imported by: 60

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(client *http.Client, endpoint string,
	tokenReader TokenReader) pmsdriver.PMSDriver

NewDriver returns an instance of driver

Types

type FileTokenReader

type FileTokenReader struct {
	Path string
}

FileTokenReader reads token from file

func (*FileTokenReader) ReadToken

func (f *FileTokenReader) ReadToken() (string, error)

ReadToken ...

type RawTokenReader

type RawTokenReader struct {
	Token string
}

RawTokenReader just returns the token contained by field Token

func (*RawTokenReader) ReadToken

func (r *RawTokenReader) ReadToken() (string, error)

ReadToken ...

type TokenReader

type TokenReader interface {
	// ReadToken reads token
	ReadToken() (string, error)
}

TokenReader is an interface used to wrap the way how to get token

Jump to

Keyboard shortcuts

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