ghbackup

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package ghbackup provides access to run all the functionality of ghbackup. The binary is just a wrapper around the Run function of package ghbackup. This way you can directly use it from any other Go program.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(config Config) error

Run update for the given Config.

Types

type Config

type Config struct {
	Account string
	Dir     string
	// Optional:
	Err     *log.Logger
	Log     *log.Logger
	Secret  string
	API     string
	Workers int
	Doer
}

Config should be passed to Run. Only Account, Dir, Updates are required.

type Doer

type Doer interface {
	Do(*http.Request) (*http.Response, error)
}

Doer makes HTTP requests. http.HTTPClient implements Doer but simpler implementations can be used too.

Jump to

Keyboard shortcuts

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