Documentation ¶
Index ¶
- func GetUnmarshalJSON(c *http.Client, url string, target interface{}) error
- func ReadCookies(h http.Header, filter string) []*http.Cookie
- func ReadSetCookies(h http.Header) []*http.Cookie
- func UnmarshalJSON(resp *http.Response, target interface{}) error
- type Config
- type ConfigAlbum
- type ConfigAlbumSources
- type ConfigPprof
- type ConfigPrometheus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUnmarshalJSON ¶
GetUnmarshalJSON gets a JSON response from url and unmarshals into target
func ReadCookies ¶
ReadCookies parses all "Cookie" values from the header h and returns the successfully parsed Cookies.
if filter isn't empty, only cookies of that name are returned
func ReadSetCookies ¶
ReadSetCookies parses all "Set-Cookie" values from the header h and returns the successfully parsed Cookies.
func UnmarshalJSON ¶
UnmarshalJSON unmarshalls an HTTP response with json.Unmarshal
Types ¶
type Config ¶
type Config struct { Albums []*ConfigAlbum `yaml:"albums"` Every string `yaml:"every,omitempty"` Prometheus ConfigPrometheus `yaml:"prometheus,omitempty"` Pprof ConfigPprof `yaml:"pprof,omitempty"` }
Config has all the config (aside from credentials) for what to do.
func LoadConfig ¶
type ConfigAlbum ¶
type ConfigAlbum struct { Name string `yaml:"name"` DryRun *bool `yaml:"dryRun,omitempty"` Delete *bool `yaml:"delete,omitempty"` ForcePublish *bool `yaml:"forcePublish,omitempty"` Sources ConfigAlbumSources `yaml:"sources"` }
type ConfigAlbumSources ¶
type ConfigAlbumSources struct {
Googlephotos []string `json:"googlephotos,omitempty"`
}
type ConfigPprof ¶
type ConfigPprof struct {
Listen string `yaml:"listen"`
}
type ConfigPrometheus ¶
type ConfigPrometheus struct {
Listen string `yaml:"listen"`
}
Click to show internal directories.
Click to hide internal directories.