api

package
v0.0.0-...-1b9946f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2024 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSources

func RegisterSources(server *otohttp.Server, sources Sources)

Types

type AddChannelRequest

type AddChannelRequest struct {
	ProjectID   string `json:"projectID"`
	Input       string `json:"input"`
	Blacklist   bool   `json:"blacklist"`
	SubmitterID string `json:"submitterID"`
}

type AddPlaylistRequest

type AddPlaylistRequest struct {
	ProjectID   string `json:"projectID"`
	Input       string `json:"input"`
	Blacklist   bool   `json:"blacklist"`
	SubmitterID string `json:"submitterID"`
}

type AddVideoRequest

type AddVideoRequest struct {
	ProjectID   string `json:"projectID"`
	Input       string `json:"input"`
	Blacklist   bool   `json:"blacklist"`
	SubmitterID string `json:"submitterID"`
}

type Channel

type Channel struct {
	ID          string `json:"id"`
	Blacklist   bool   `json:"blacklist"`
	SubmitterID string `json:"submitterID"`
	Submitted   int64  `json:"submitted"`
	Error       string `json:"error,omitempty"`
}

type Collaborator

type Collaborator struct {
	ID       string `json:"id"`
	Username string `json:"username"`
}

type DeleteProject

type DeleteProject struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type GetProject

type GetProject struct {
	ID string `json:"id"`
}

type GetProjectByName

type GetProjectByName struct {
	Name string `json:"name"`
}

type GetProjectIDsForChannelRequest

type GetProjectIDsForChannelRequest struct {
	ChannelID string `json:"channelID"`
}

type GetProjectIDsForChannelResponse

type GetProjectIDsForChannelResponse struct {
	ProjectIDs []string `json:"projectIDs"`
	Error      string   `json:"error,omitempty"`
}

type GetProjectIDsForPlaylistRequest

type GetProjectIDsForPlaylistRequest struct {
	PlaylistID string `json:"playlistID"`
}

type GetProjectIDsForPlaylistResponse

type GetProjectIDsForPlaylistResponse struct {
	ProjectIDs []string `json:"projectIDs"`
	Error      string   `json:"error,omitempty"`
}

type GetProjectIDsForVideoRequest

type GetProjectIDsForVideoRequest struct {
	VideoID string `json:"videoID"`
}

type GetProjectIDsForVideoResponse

type GetProjectIDsForVideoResponse struct {
	ProjectIDs []string `json:"projectIDs"`
	Error      string   `json:"error,omitempty"`
}

type IsProjectEmptyRequest

type IsProjectEmptyRequest struct {
	ProjectID string `json:"projectID"`
}

type IsProjectEmptyResponse

type IsProjectEmptyResponse struct {
	IsEmpty bool   `json:"isEmpty"`
	Error   string `json:"error,omitempty"`
}

type ListChannelIDsRequest

type ListChannelIDsRequest struct {
	ProjectID string `json:"projectID"`
	Blacklist bool   `json:"blacklist"`
}

type ListChannelIDsResponse

type ListChannelIDsResponse struct {
	IDs   []string `json:"iDS"`
	Error string   `json:"error,omitempty"`
}

type ListChannelsRequest

type ListChannelsRequest struct {
	ProjectID string `json:"projectID"`
}

type ListChannelsResponse

type ListChannelsResponse struct {
	Channels []*Channel `json:"channels"`
	Error    string     `json:"error,omitempty"`
}

type ListPlaylistIDsRequest

type ListPlaylistIDsRequest struct {
	ProjectID string `json:"projectID"`
	Blacklist bool   `json:"blacklist"`
}

type ListPlaylistIDsResponse

type ListPlaylistIDsResponse struct {
	IDs   []string `json:"iDS"`
	Error string   `json:"error,omitempty"`
}

type ListPlaylistsRequest

type ListPlaylistsRequest struct {
	ProjectID string `json:"projectID"`
}

type ListPlaylistsResponse

type ListPlaylistsResponse struct {
	Playlists []*Playlist `json:"playlists"`
	Error     string      `json:"error,omitempty"`
}

type ListProjectsRequest

type ListProjectsRequest struct {
	CreatedByUserID string `json:"createdByUserID"`
	VisibleToUserID string `json:"visibleToUserID"`
}

type ListProjectsResponse

type ListProjectsResponse struct {
	Projects []*Project `json:"projects"`
	Error    string     `json:"error,omitempty"`
}

type ListVideoIDsRequest

type ListVideoIDsRequest struct {
	ProjectID string `json:"projectID"`
	Blacklist bool   `json:"blacklist"`
}

type ListVideoIDsResponse

type ListVideoIDsResponse struct {
	IDs   []string `json:"iDS"`
	Error string   `json:"error,omitempty"`
}

type ListVideosRequest

type ListVideosRequest struct {
	ProjectID string `json:"projectID"`
}

type ListVideosResponse

type ListVideosResponse struct {
	Videos []*Video `json:"videos"`
	Error  string   `json:"error,omitempty"`
}

type Playlist

type Playlist struct {
	ID          string `json:"id"`
	Blacklist   bool   `json:"blacklist"`
	SubmitterID string `json:"submitterID"`
	Submitted   int64  `json:"submitted"`
	Error       string `json:"error,omitempty"`
}

type Project

type Project struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	CreatorID   string   `json:"creatorID"`
	Created     int64    `json:"created"`
	GroupID     string   `json:"groupID"`
	Description string   `json:"description"`
	Tags        []string `json:"tags"`
	Error       string   `json:"error,omitempty"`
}

type RemoveChannelRequest

type RemoveChannelRequest struct {
	ProjectID string `json:"projectID"`
	ID        string `json:"id"`
	Blacklist bool   `json:"blacklist"`
}

type RemovePlaylistRequest

type RemovePlaylistRequest struct {
	ProjectID string `json:"projectID"`
	ID        string `json:"id"`
	Blacklist bool   `json:"blacklist"`
}

type RemoveVideoRequest

type RemoveVideoRequest struct {
	ProjectID string `json:"projectID"`
	ID        string `json:"id"`
	Blacklist bool   `json:"blacklist"`
}

type Sources

type Sources interface {
	AddChannel(context.Context, AddChannelRequest) (*Channel, error)
	AddPlaylist(context.Context, AddPlaylistRequest) (*Playlist, error)
	AddVideo(context.Context, AddVideoRequest) (*Video, error)
	CreateProject(context.Context, Project) (*Project, error)
	DeleteProject(context.Context, DeleteProject) (*Void, error)
	GetProject(context.Context, GetProject) (*Project, error)
	GetProjectByName(context.Context, GetProjectByName) (*Project, error)
	GetProjectIDsForChannel(context.Context, GetProjectIDsForChannelRequest) (*GetProjectIDsForChannelResponse, error)
	GetProjectIDsForPlaylist(context.Context, GetProjectIDsForPlaylistRequest) (*GetProjectIDsForPlaylistResponse, error)
	GetProjectIDsForVideo(context.Context, GetProjectIDsForVideoRequest) (*GetProjectIDsForVideoResponse, error)
	IsProjectEmpty(context.Context, IsProjectEmptyRequest) (*IsProjectEmptyResponse, error)
	ListChannelIDs(context.Context, ListChannelIDsRequest) (*ListChannelIDsResponse, error)
	ListChannels(context.Context, ListChannelsRequest) (*ListChannelsResponse, error)
	ListPlaylistIDs(context.Context, ListPlaylistIDsRequest) (*ListPlaylistIDsResponse, error)
	ListPlaylists(context.Context, ListPlaylistsRequest) (*ListPlaylistsResponse, error)
	ListProjects(context.Context, ListProjectsRequest) (*ListProjectsResponse, error)
	ListVideoIDs(context.Context, ListVideoIDsRequest) (*ListVideoIDsResponse, error)
	ListVideos(context.Context, ListVideosRequest) (*ListVideosResponse, error)
	RemoveChannel(context.Context, RemoveChannelRequest) (*Void, error)
	RemovePlaylist(context.Context, RemovePlaylistRequest) (*Void, error)
	RemoveVideo(context.Context, RemoveVideoRequest) (*Void, error)
}

func NewSourcesClient

func NewSourcesClient(
	endpoint string,
	options ...*SourcesClientOptions,
) Sources

func NewSourcesClientFromOptions

func NewSourcesClientFromOptions(opts base.ServiceOptions) Sources

type SourcesClientOptions

type SourcesClientOptions struct {
	// contains filtered or unexported fields
}

func NewSourcesClientOptions

func NewSourcesClientOptions() *SourcesClientOptions

func (*SourcesClientOptions) SetBasicAuth

func (o *SourcesClientOptions) SetBasicAuth(username, password string) *SourcesClientOptions

func (*SourcesClientOptions) SetTimeout

func (o *SourcesClientOptions) SetTimeout(timeout time.Duration) *SourcesClientOptions

func (*SourcesClientOptions) SetTransport

func (o *SourcesClientOptions) SetTransport(transport http.RoundTripper) *SourcesClientOptions

type Video

type Video struct {
	ID          string `json:"id"`
	Blacklist   bool   `json:"blacklist"`
	SubmitterID string `json:"submitterID"`
	Submitted   int64  `json:"submitted"`
	Error       string `json:"error,omitempty"`
}

type Void

type Void struct {
	Error string `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL