Documentation
¶
Index ¶
- Variables
- func Execute()
- func GetData(r io.ReadCloser, v interface{}) error
- func GetJson(r io.ReadCloser) (string, error)
- func NewClientError(err error, detail string) error
- func NewRequest(opts ...RequestOption) (*http.Request, error)
- func PrintData(p Printer, r io.ReadCloser) error
- type AppUser
- type ClientError
- type MasterPass
- type Printer
- type RequestOption
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "dev"
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GetData ¶
func GetData(r io.ReadCloser, v interface{}) error
func NewClientError ¶
func NewRequest ¶
func NewRequest(opts ...RequestOption) (*http.Request, error)
Types ¶
type ClientError ¶
func (*ClientError) Error ¶
func (c *ClientError) Error() string
type MasterPass ¶
type MasterPass struct {
Password string `json:"master_password"`
}
type RequestOption ¶
func SetBody ¶
func SetBody(body io.Reader) RequestOption
func SetCredentials ¶
func SetCredentials(user, pass string) RequestOption
func SetMethod ¶
func SetMethod(method string) RequestOption
func SetQuery ¶
func SetQuery(query map[string]string) RequestOption
func SetURL ¶
func SetURL(URL string) RequestOption
Click to show internal directories.
Click to hide internal directories.