Documentation
¶
Index ¶
- func BuildOAuthHTTPClient(ctx context.Context, scopes []string, oAuthPort int) (*http.Client, error)
- func Open(filename string, mediaType MediaType) (io.ReadCloser, int64, error)
- func Run(ctx context.Context, transport *limiter.LimitTransport, config Config, ...) error
- func SetSignalNotify(c chan os.Signal)
- type Cache
- type CacheFile
- type CallbackStatus
- type Config
- type Date
- type MediaType
- type Playlistx
- type VideoMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOAuthHTTPClient ¶
func BuildOAuthHTTPClient(ctx context.Context, scopes []string, oAuthPort int) (*http.Client, error)
BuildOAuthHTTPClient takes the user through the three-legged OAuth flow. It opens a browser in the native OS or outputs a URL, then blocks until the redirect completes to the /oauth2callback URI. It returns an instance of an HTTP client that can be passed to the constructor of the YouTube client.
func Run ¶
func Run(ctx context.Context, transport *limiter.LimitTransport, config Config, videoReader io.ReadCloser) error
func SetSignalNotify ¶
Types ¶
type CacheFile ¶
type CacheFile string
CacheFile implements Cache. Its value is the name of the file in which the Token is stored in JSON format.
type CallbackStatus ¶
type CallbackStatus struct {
// contains filtered or unexported fields
}
CallbackStatus is returned from the oauth2 callback
type Config ¶
type Config struct {
Filename string
Thumbnail string
Caption string
Title string
Description string
Language string
CategoryId string
Tags string
Privacy string
Quiet bool
RateLimit int
MetaJSON string
MetaJSONOut string
LimitBetween string
PlaylistIDs []string
OAuthPort int
ShowAppVersion bool
Chunksize int
NotifySubscribers bool
SendFileName bool
RecordingDate Date
}
type Date ¶
func (*Date) UnmarshalJSON ¶
type VideoMeta ¶
type VideoMeta struct {
// snippet
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
CategoryId string `json:"categoryId,omitempty"`
Tags []string `json:"tags,omitempty"`
// status
PrivacyStatus string `json:"privacyStatus,omitempty"`
Embeddable bool `json:"embeddable,omitempty"`
License string `json:"license,omitempty"`
PublicStatsViewable bool `json:"publicStatsViewable,omitempty"`
PublishAt Date `json:"publishAt,omitempty"`
MadeForKids bool `json:"madeForKids,omitempty"`
ContainsSyntheticMedia bool `json:"containsSyntheticMedia,omitempty"`
// recording details
RecordingDate Date `json:"recordingDate,omitempty"`
PlaylistIDs []string `json:"playlistIds,omitempty"`
PlaylistTitles []string `json:"playlistTitles,omitempty"`
// BCP-47 language code e.g. 'en','es'
Language string `json:"language,omitempty"`
Localizations map[string]youtube.VideoLocalization `json:"localizations,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.