Documentation ¶
Index ¶
- func ListPlaylists(service *youtube.Service) ([]*youtube.Playlist, error)
- func ListenAndServe(port string, version int) error
- func NewYoutubeClient(ctx context.Context, clientID, secret string, token *oauth2.Token) (*youtube.Service, error)
- func NewYoutubeOAuthConfig(clientID, secret string) *oauth2.Config
- type DB
- type GcpClient
- type Thing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListPlaylists ¶
func ListPlaylists(service *youtube.Service) ([]*youtube.Playlist, error)
ListPlaylists returns all of the playlists associated with the user the service is created for
func ListenAndServe ¶
ListenAndServe provides the HTTP server handler
func NewYoutubeClient ¶
func NewYoutubeClient(ctx context.Context, clientID, secret string, token *oauth2.Token) (*youtube.Service, error)
NewYoutubeClient creates an instance of the YouTube Service for the given user
func NewYoutubeOAuthConfig ¶
NewYoutubeOAuthConfig creates an OAuth2 configuration object with the needed YouTube scopes for the given client info
Types ¶
type DB ¶
type DB interface { // Create creates a new entity Create(thing Thing) error // Update updates a new entity Update(thing Thing) error // Delete deletes an existing thing Delete(id int) error // AllThings retrieves every thing AllThings() (things []Thing, err error) // ByID returns a single tea instance based on its ID ByID(id int) (t Thing, err error) }
DB defines the interface needed by any database client
type GcpClient ¶
type GcpClient struct {
// contains filtered or unexported fields
}
GcpClient is the client struct
func NewGcpClient ¶
NewGcpClient creates a new GcpClient
Click to show internal directories.
Click to hide internal directories.