provider

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInternalServerError = errors.New("remote push server: internal error")
	ErrServiceUnavailable  = errors.New("remote push server: service unavailable")
)

Functions

func DecodeJSONResponse added in v1.0.4

func DecodeJSONResponse(r io.Reader, retval interface{}) error

DecodeJSONResponse unmarshal response in json format to the object. If server returns invalid json data, the method represents a response body as an error

func JSONWithoutSecrets added in v1.0.4

func JSONWithoutSecrets(obj interface{}) ([]byte, error)

func RemoveSecretsFromJSON added in v1.0.4

func RemoveSecretsFromJSON(in []byte) []byte

func SendWithRetry

func SendWithRetry(maxRetries int, send func() (statusCode int, _ error)) error

Types

type IRequest

type IRequest interface {
	SetToken(token string)
	ShouldIgnore() bool
}

type Pipe added in v1.0.4

type Pipe struct {
	// contains filtered or unexported fields
}

func NewPipe added in v1.0.4

func NewPipe(write func(io.Writer) error) *Pipe

func (*Pipe) Close added in v1.0.4

func (p *Pipe) Close() error

func (*Pipe) Read added in v1.0.4

func (p *Pipe) Read(out []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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