Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct { AlbumTitle string `short:"a" long:"album" value-name:"TITLE" description:"Add files to the album or a new album if it does not exist"` NewAlbum string `short:"n" long:"new-album" value-name:"TITLE" description:"Add files to a new album"` RequestHeaders []string `long:"request-header" value-name:"KEY:VALUE" description:"Add the header on fetching URLs"` RequestBasicAuth string `long:"request-auth" value-name:"USER:PASS" description:"Add the basic auth header on fetching URLs"` ConfigName string `long:"gpupconfig" env:"GPUPCONFIG" default:"~/.gpupconfig" description:"Path to the config file"` Debug bool `long:"debug" env:"DEBUG" description:"Enable request and response logging"` ExternalConfig ExternalConfig `group:"Options read from gpupconfig"` Paths []string }
CLI represents input for the command.
type EncodedToken ¶
type EncodedToken string
EncodedToken is a base64 encoded json of token.
func EncodeToken ¶
func EncodeToken(token *oauth2.Token) (EncodedToken, error)
EncodeToken returns an EncodedToken.
type ExternalConfig ¶
type ExternalConfig struct { ClientID string `yaml:"client-id" long:"google-client-id" env:"GOOGLE_CLIENT_ID" description:"Google API client ID"` ClientSecret string `yaml:"client-secret" long:"google-client-secret" env:"GOOGLE_CLIENT_SECRET" description:"Google API client secret"` EncodedToken EncodedToken `yaml:"token" long:"google-token" env:"GOOGLE_TOKEN" description:"Google API token"` }
ExternalConfig represents items in gpupconfig.
func (*ExternalConfig) Read ¶
func (c *ExternalConfig) Read(name string) error
Read parses the YAML file.
func (*ExternalConfig) Write ¶
func (c *ExternalConfig) Write(name string) error
Write writes the items to the YAML file.
Click to show internal directories.
Click to hide internal directories.