Documentation ¶
Index ¶
- Variables
- func AskForHostCredentials(host Host) error
- func AskYesNo(s string) (bool, error)
- func CheckError(err error)
- func GetLine(params GetLineParams) (ret []byte, err error)
- func LoadHostCredentials(host Host) error
- func RepoInfoFromURL(urlString string) (result struct{ ... }, err error)
- func Request(params *RequestParams) (int, error)
- func SaveHostCredentials(host Host) error
- type GetLineParams
- type Host
- type RequestParams
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoNil = errors.New("unexpected nil value") ErrInvalidType = errors.New("invalid type") ErrExpectedStruct = errors.New("expected struct type") ErrNotHandledType = errors.New("type not handled") ErrUnhandledFieldType = errors.New("only handles slice of byte as field type") )
View Source
var (
ErrInvalidRepositoryURL = errors.New("invalid given url")
)
Functions ¶
func AskForHostCredentials ¶
Takes a host and get its credentials from the user. To define how the credentials must be asked, use the struct tags parse-name, parse-info and parse-reg:
- parse-name is the name of value that will asked, typically the user will be asked a question like "please enter your <parse-name>" parse-name is required
- parse-info is just a sentence adding more info to your request
- parse-reg is the regexp that the user input must match to be valid
func CheckError ¶
func CheckError(err error)
func GetLine ¶
func GetLine(params GetLineParams) (ret []byte, err error)
func LoadHostCredentials ¶
func RepoInfoFromURL ¶
func Request ¶
func Request(params *RequestParams) (int, error)
Request is just a helper function for the hosts to request their server
func SaveHostCredentials ¶
Types ¶
type GetLineParams ¶
Click to show internal directories.
Click to hide internal directories.