common

package
v0.0.0-...-24f3dd9 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthUser

func AuthUser(c *cli.Context) (http.Client, string, error)

AuthUser authenticates user with provided username/pw in JIRA using basicauth

func CliError

func CliError(err error) *cli.ExitError

CliError formats provided error into Red colored string and returns cli.NewExitError

func ConfluenceWaitForBackupReadyness

func ConfluenceWaitForBackupReadyness(client http.Client, host string) (string, error)

ConfluenceWaitForBackupReadyness check status of a backup and loops until it's ready

func JiraWaitForBackupReadyness

func JiraWaitForBackupReadyness(client http.Client, id string, host string) (string, error)

JiraWaitForBackupReadyness check status of a backup and loops until it's ready

Types

type BackupBody

type BackupBody struct {
	CbAttachments string `json:"cbAttachments"`
	ExportToCloud string `json:"exportToCloud"`
}

BackupBody is a struct for a JSON sent to JIRA/Confluence backup endpoint

type PassThru

type PassThru struct {
	io.Reader
	Total    int64 // Total # of bytes transferred
	Length   int64 // Expected length
	Progress float64
}

PassThru wraps an existing io.Reader.

It simply forwards the Read() call, while displaying the results from individual calls to it

func (*PassThru) Read

func (pt *PassThru) Read(p []byte) (int, error)

Read 'overrides' the underlying io.Reader's Read method. This is the one that will be called by io.Copy(). We simply use it to keep track of byte counts and then forward the call.

Jump to

Keyboard shortcuts

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