Documentation ¶
Index ¶
- Constants
- Variables
- func WriteError(resp http.ResponseWriter, err error)
- type AddPodReq
- type AddPodRes
- type Admin
- type Auth
- type AuthenticateReq
- func (*AuthenticateReq) Descriptor() ([]byte, []int)deprecated
- func (x *AuthenticateReq) GetPassword() string
- func (x *AuthenticateReq) GetStayLoggedIn() bool
- func (x *AuthenticateReq) GetUserAgent() string
- func (x *AuthenticateReq) GetUsername() string
- func (*AuthenticateReq) ProtoMessage()
- func (x *AuthenticateReq) ProtoReflect() protoreflect.Message
- func (x *AuthenticateReq) Reset()
- func (x *AuthenticateReq) String() string
- type AuthenticateRes
- func (*AuthenticateRes) Descriptor() ([]byte, []int)deprecated
- func (x *AuthenticateRes) GetSessionKey() string
- func (x *AuthenticateRes) GetUser() *User
- func (*AuthenticateRes) ProtoMessage()
- func (x *AuthenticateRes) ProtoReflect() protoreflect.Message
- func (x *AuthenticateRes) Reset()
- func (x *AuthenticateRes) String() string
- type AuthorizeReq
- type AuthorizeRes
- type Category
- type Episode
- func (*Episode) Descriptor() ([]byte, []int)deprecated
- func (x *Episode) GetAuthor() string
- func (x *Episode) GetDescription() string
- func (x *Episode) GetDurationMillis() int64
- func (x *Episode) GetEncoded() string
- func (x *Episode) GetEpisode() int32
- func (x *Episode) GetEpisodeType() string
- func (x *Episode) GetExplicit() string
- func (x *Episode) GetId() string
- func (x *Episode) GetImage() *Image
- func (x *Episode) GetMP3URL() string
- func (x *Episode) GetPodcastID() string
- func (x *Episode) GetPubDate() *timestamppb.Timestamp
- func (x *Episode) GetSeason() int32
- func (x *Episode) GetSubtitle() string
- func (x *Episode) GetSummary() string
- func (x *Episode) GetTitle() string
- func (*Episode) ProtoMessage()
- func (x *Episode) ProtoReflect() protoreflect.Message
- func (x *Episode) Reset()
- func (x *Episode) String() string
- type Episodes
- type GetEpiReq
- func (*GetEpiReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetEpiReq) GetEnd() int64
- func (x *GetEpiReq) GetId() string
- func (x *GetEpiReq) GetStart() int64
- func (*GetEpiReq) ProtoMessage()
- func (x *GetEpiReq) ProtoReflect() protoreflect.Message
- func (x *GetEpiReq) Reset()
- func (x *GetEpiReq) String() string
- type GetPodReq
- type GetSubReq
- type GetUserEpiReq
- type GetUserLastPlayedReq
- type HTTPClient
- type Image
- type LastPlayedRes
- func (*LastPlayedRes) Descriptor() ([]byte, []int)deprecated
- func (x *LastPlayedRes) GetEpisode() *Episode
- func (x *LastPlayedRes) GetMillis() int64
- func (x *LastPlayedRes) GetPodcast() *Podcast
- func (*LastPlayedRes) ProtoMessage()
- func (x *LastPlayedRes) ProtoReflect() protoreflect.Message
- func (x *LastPlayedRes) Reset()
- func (x *LastPlayedRes) String() string
- type LogoutReq
- type LogoutRes
- type Pod
- type Podcast
- func (*Podcast) Descriptor() ([]byte, []int)deprecated
- func (x *Podcast) GetAuthor() string
- func (x *Podcast) GetCategory() []*Category
- func (x *Podcast) GetEpisodic() bool
- func (x *Podcast) GetExplicit() string
- func (x *Podcast) GetId() string
- func (x *Podcast) GetImage() *Image
- func (x *Podcast) GetKeywords() []string
- func (x *Podcast) GetLanguage() string
- func (x *Podcast) GetLastBuildDate() *timestamppb.Timestamp
- func (x *Podcast) GetLink() string
- func (x *Podcast) GetPubDate() *timestamppb.Timestamp
- func (x *Podcast) GetRss() string
- func (x *Podcast) GetSummary() string
- func (x *Podcast) GetTitle() string
- func (*Podcast) ProtoMessage()
- func (x *Podcast) ProtoReflect() protoreflect.Message
- func (x *Podcast) Reset()
- func (x *Podcast) String() string
- type RefPodReq
- type RefPodRes
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetEnd() int64
- func (x *Request) GetEpisodeID() string
- func (x *Request) GetPodcastID() string
- func (x *Request) GetStart() int64
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- type Session
- func (*Session) Descriptor() ([]byte, []int)deprecated
- func (x *Session) GetExpires() *timestamppb.Timestamp
- func (x *Session) GetId() string
- func (x *Session) GetLastSeenTime() *timestamppb.Timestamp
- func (x *Session) GetLoginTime() *timestamppb.Timestamp
- func (x *Session) GetSessionKey() string
- func (x *Session) GetUserAgent() string
- func (x *Session) GetUserID() string
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Reset()
- func (x *Session) String() string
- type Subscription
- func (*Subscription) Descriptor() ([]byte, []int)deprecated
- func (x *Subscription) GetCompletedIDs() []string
- func (x *Subscription) GetId() string
- func (x *Subscription) GetInProgressIDs() []string
- func (x *Subscription) GetPodcastID() string
- func (x *Subscription) GetUserID() string
- func (*Subscription) ProtoMessage()
- func (x *Subscription) ProtoReflect() protoreflect.Message
- func (x *Subscription) Reset()
- func (x *Subscription) String() string
- type Subscriptions
- type TwirpServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetDOB() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetId() string
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserEpisode
- func (*UserEpisode) Descriptor() ([]byte, []int)deprecated
- func (x *UserEpisode) GetEpisodeID() string
- func (x *UserEpisode) GetLastSeen() *timestamppb.Timestamp
- func (x *UserEpisode) GetOffset() int64
- func (x *UserEpisode) GetPlayed() bool
- func (x *UserEpisode) GetUserID() string
- func (*UserEpisode) ProtoMessage()
- func (x *UserEpisode) ProtoReflect() protoreflect.Message
- func (x *UserEpisode) Reset()
- func (x *UserEpisode) String() string
Constants ¶
const AdminPathPrefix = "/twirp/protos.Admin/"
AdminPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html
const AuthPathPrefix = "/twirp/protos.Auth/"
AuthPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html
const PodPathPrefix = "/twirp/protos.Pod/"
PodPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html
Variables ¶
var File_admin_proto protoreflect.FileDescriptor
var File_auth_proto protoreflect.FileDescriptor
var File_podcast_proto protoreflect.FileDescriptor
var File_user_proto protoreflect.FileDescriptor
Functions ¶
func WriteError ¶
func WriteError(resp http.ResponseWriter, err error)
WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
Types ¶
type AddPodReq ¶
type AddPodReq struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*AddPodReq) Descriptor
deprecated
func (*AddPodReq) ProtoMessage ¶
func (*AddPodReq) ProtoMessage()
func (*AddPodReq) ProtoReflect ¶
func (x *AddPodReq) ProtoReflect() protoreflect.Message
type AddPodRes ¶
type AddPodRes struct { Podcast *Podcast `protobuf:"bytes,1,opt,name=podcast,proto3" json:"podcast,omitempty"` // contains filtered or unexported fields }
func (*AddPodRes) Descriptor
deprecated
func (*AddPodRes) GetPodcast ¶
func (*AddPodRes) ProtoMessage ¶
func (*AddPodRes) ProtoMessage()
func (*AddPodRes) ProtoReflect ¶
func (x *AddPodRes) ProtoReflect() protoreflect.Message
type Admin ¶
type Admin interface { // Podcasts AddPodcast(context.Context, *AddPodReq) (*AddPodRes, error) RefreshPodcast(context.Context, *RefPodReq) (*RefPodRes, error) }
func NewAdminJSONClient ¶
func NewAdminJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Admin
NewAdminJSONClient creates a JSON client that implements the Admin interface. It communicates using JSON and can be configured with a custom HTTPClient.
func NewAdminProtobufClient ¶
func NewAdminProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Admin
NewAdminProtobufClient creates a Protobuf client that implements the Admin interface. It communicates using Protobuf and can be configured with a custom HTTPClient.
type Auth ¶
type Auth interface { Authenticate(context.Context, *AuthenticateReq) (*AuthenticateRes, error) // } Logout(context.Context, *LogoutReq) (*LogoutRes, error) }
func NewAuthJSONClient ¶
func NewAuthJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Auth
NewAuthJSONClient creates a JSON client that implements the Auth interface. It communicates using JSON and can be configured with a custom HTTPClient.
func NewAuthProtobufClient ¶
func NewAuthProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Auth
NewAuthProtobufClient creates a Protobuf client that implements the Auth interface. It communicates using Protobuf and can be configured with a custom HTTPClient.
type AuthenticateReq ¶
type AuthenticateReq struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` StayLoggedIn bool `protobuf:"varint,3,opt,name=stayLoggedIn,proto3" json:"stayLoggedIn,omitempty"` UserAgent string `protobuf:"bytes,4,opt,name=userAgent,proto3" json:"userAgent,omitempty"` // contains filtered or unexported fields }
func (*AuthenticateReq) Descriptor
deprecated
func (*AuthenticateReq) Descriptor() ([]byte, []int)
Deprecated: Use AuthenticateReq.ProtoReflect.Descriptor instead.
func (*AuthenticateReq) GetPassword ¶
func (x *AuthenticateReq) GetPassword() string
func (*AuthenticateReq) GetStayLoggedIn ¶
func (x *AuthenticateReq) GetStayLoggedIn() bool
func (*AuthenticateReq) GetUserAgent ¶
func (x *AuthenticateReq) GetUserAgent() string
func (*AuthenticateReq) GetUsername ¶
func (x *AuthenticateReq) GetUsername() string
func (*AuthenticateReq) ProtoMessage ¶
func (*AuthenticateReq) ProtoMessage()
func (*AuthenticateReq) ProtoReflect ¶
func (x *AuthenticateReq) ProtoReflect() protoreflect.Message
func (*AuthenticateReq) Reset ¶
func (x *AuthenticateReq) Reset()
func (*AuthenticateReq) String ¶
func (x *AuthenticateReq) String() string
type AuthenticateRes ¶
type AuthenticateRes struct { SessionKey string `protobuf:"bytes,1,opt,name=sessionKey,proto3" json:"sessionKey,omitempty"` User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*AuthenticateRes) Descriptor
deprecated
func (*AuthenticateRes) Descriptor() ([]byte, []int)
Deprecated: Use AuthenticateRes.ProtoReflect.Descriptor instead.
func (*AuthenticateRes) GetSessionKey ¶
func (x *AuthenticateRes) GetSessionKey() string
func (*AuthenticateRes) GetUser ¶
func (x *AuthenticateRes) GetUser() *User
func (*AuthenticateRes) ProtoMessage ¶
func (*AuthenticateRes) ProtoMessage()
func (*AuthenticateRes) ProtoReflect ¶
func (x *AuthenticateRes) ProtoReflect() protoreflect.Message
func (*AuthenticateRes) Reset ¶
func (x *AuthenticateRes) Reset()
func (*AuthenticateRes) String ¶
func (x *AuthenticateRes) String() string
type AuthorizeReq ¶
type AuthorizeReq struct { SessionKey string `protobuf:"bytes,1,opt,name=sessionKey,proto3" json:"sessionKey,omitempty"` // contains filtered or unexported fields }
func (*AuthorizeReq) Descriptor
deprecated
func (*AuthorizeReq) Descriptor() ([]byte, []int)
Deprecated: Use AuthorizeReq.ProtoReflect.Descriptor instead.
func (*AuthorizeReq) GetSessionKey ¶
func (x *AuthorizeReq) GetSessionKey() string
func (*AuthorizeReq) ProtoMessage ¶
func (*AuthorizeReq) ProtoMessage()
func (*AuthorizeReq) ProtoReflect ¶
func (x *AuthorizeReq) ProtoReflect() protoreflect.Message
func (*AuthorizeReq) Reset ¶
func (x *AuthorizeReq) Reset()
func (*AuthorizeReq) String ¶
func (x *AuthorizeReq) String() string
type AuthorizeRes ¶
type AuthorizeRes struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*AuthorizeRes) Descriptor
deprecated
func (*AuthorizeRes) Descriptor() ([]byte, []int)
Deprecated: Use AuthorizeRes.ProtoReflect.Descriptor instead.
func (*AuthorizeRes) GetUser ¶
func (x *AuthorizeRes) GetUser() *User
func (*AuthorizeRes) ProtoMessage ¶
func (*AuthorizeRes) ProtoMessage()
func (*AuthorizeRes) ProtoReflect ¶
func (x *AuthorizeRes) ProtoReflect() protoreflect.Message
func (*AuthorizeRes) Reset ¶
func (x *AuthorizeRes) Reset()
func (*AuthorizeRes) String ¶
func (x *AuthorizeRes) String() string
type Category ¶
type Category struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` Category []*Category `protobuf:"bytes,2,rep,name=category,proto3" json:"category,omitempty"` // contains filtered or unexported fields }
func (*Category) Descriptor
deprecated
func (*Category) GetCategory ¶
func (*Category) ProtoMessage ¶
func (*Category) ProtoMessage()
func (*Category) ProtoReflect ¶
func (x *Category) ProtoReflect() protoreflect.Message
type Episode ¶
type Episode struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` PodcastID string `protobuf:"bytes,2,opt,name=podcastID,proto3" json:"podcastID,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Author string `protobuf:"bytes,4,opt,name=author,proto3" json:"author,omitempty"` EpisodeType string `protobuf:"bytes,5,opt,name=episodeType,proto3" json:"episodeType,omitempty"` // values are full,trailer,bonus Image *Image `protobuf:"bytes,6,opt,name=image,proto3" json:"image,omitempty"` PubDate *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=pubDate,proto3" json:"pubDate,omitempty"` Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` Summary string `protobuf:"bytes,9,opt,name=summary,proto3" json:"summary,omitempty"` Season int32 `protobuf:"varint,10,opt,name=season,proto3" json:"season,omitempty"` Episode int32 `protobuf:"varint,11,opt,name=episode,proto3" json:"episode,omitempty"` // repeated Category category = 12; Explicit string `protobuf:"bytes,13,opt,name=explicit,proto3" json:"explicit,omitempty"` MP3URL string `protobuf:"bytes,14,opt,name=MP3URL,proto3" json:"MP3URL,omitempty"` DurationMillis int64 `protobuf:"varint,15,opt,name=durationMillis,proto3" json:"durationMillis,omitempty"` Subtitle string `protobuf:"bytes,16,opt,name=subtitle,proto3" json:"subtitle,omitempty"` Encoded string `protobuf:"bytes,17,opt,name=encoded,proto3" json:"encoded,omitempty"` // contains filtered or unexported fields }
func (*Episode) Descriptor
deprecated
func (*Episode) GetDescription ¶
func (*Episode) GetDurationMillis ¶
func (*Episode) GetEncoded ¶
func (*Episode) GetEpisode ¶
func (*Episode) GetEpisodeType ¶
func (*Episode) GetExplicit ¶
func (*Episode) GetPodcastID ¶
func (*Episode) GetPubDate ¶
func (x *Episode) GetPubDate() *timestamppb.Timestamp
func (*Episode) GetSubtitle ¶
func (*Episode) GetSummary ¶
func (*Episode) ProtoMessage ¶
func (*Episode) ProtoMessage()
func (*Episode) ProtoReflect ¶
func (x *Episode) ProtoReflect() protoreflect.Message
type Episodes ¶
type Episodes struct { Episodes []*Episode `protobuf:"bytes,1,rep,name=episodes,proto3" json:"episodes,omitempty"` // contains filtered or unexported fields }
func (*Episodes) Descriptor
deprecated
func (*Episodes) GetEpisodes ¶
func (*Episodes) ProtoMessage ¶
func (*Episodes) ProtoMessage()
func (*Episodes) ProtoReflect ¶
func (x *Episodes) ProtoReflect() protoreflect.Message
type GetEpiReq ¶
type GetEpiReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Start int64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` // contains filtered or unexported fields }
func (*GetEpiReq) Descriptor
deprecated
func (*GetEpiReq) ProtoMessage ¶
func (*GetEpiReq) ProtoMessage()
func (*GetEpiReq) ProtoReflect ¶
func (x *GetEpiReq) ProtoReflect() protoreflect.Message
type GetPodReq ¶
type GetPodReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetPodReq) Descriptor
deprecated
func (*GetPodReq) ProtoMessage ¶
func (*GetPodReq) ProtoMessage()
func (*GetPodReq) ProtoReflect ¶
func (x *GetPodReq) ProtoReflect() protoreflect.Message
type GetSubReq ¶
type GetSubReq struct {
// contains filtered or unexported fields
}
func (*GetSubReq) Descriptor
deprecated
func (*GetSubReq) ProtoMessage ¶
func (*GetSubReq) ProtoMessage()
func (*GetSubReq) ProtoReflect ¶
func (x *GetSubReq) ProtoReflect() protoreflect.Message
type GetUserEpiReq ¶
type GetUserEpiReq struct { EpiID string `protobuf:"bytes,1,opt,name=epiID,proto3" json:"epiID,omitempty"` // contains filtered or unexported fields }
func (*GetUserEpiReq) Descriptor
deprecated
func (*GetUserEpiReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserEpiReq.ProtoReflect.Descriptor instead.
func (*GetUserEpiReq) GetEpiID ¶
func (x *GetUserEpiReq) GetEpiID() string
func (*GetUserEpiReq) ProtoMessage ¶
func (*GetUserEpiReq) ProtoMessage()
func (*GetUserEpiReq) ProtoReflect ¶
func (x *GetUserEpiReq) ProtoReflect() protoreflect.Message
func (*GetUserEpiReq) Reset ¶
func (x *GetUserEpiReq) Reset()
func (*GetUserEpiReq) String ¶
func (x *GetUserEpiReq) String() string
type GetUserLastPlayedReq ¶
type GetUserLastPlayedReq struct {
// contains filtered or unexported fields
}
func (*GetUserLastPlayedReq) Descriptor
deprecated
func (*GetUserLastPlayedReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserLastPlayedReq.ProtoReflect.Descriptor instead.
func (*GetUserLastPlayedReq) ProtoMessage ¶
func (*GetUserLastPlayedReq) ProtoMessage()
func (*GetUserLastPlayedReq) ProtoReflect ¶
func (x *GetUserLastPlayedReq) ProtoReflect() protoreflect.Message
func (*GetUserLastPlayedReq) Reset ¶
func (x *GetUserLastPlayedReq) Reset()
func (*GetUserLastPlayedReq) String ¶
func (x *GetUserLastPlayedReq) String() string
type HTTPClient ¶
HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.
HTTPClient implementations should not follow redirects. Redirects are automatically disabled if *(net/http).Client is passed to client constructors. See the withoutRedirects function in this file for more details.
type Image ¶
type Image struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*Image) Descriptor
deprecated
func (*Image) ProtoMessage ¶
func (*Image) ProtoMessage()
func (*Image) ProtoReflect ¶
func (x *Image) ProtoReflect() protoreflect.Message
type LastPlayedRes ¶
type LastPlayedRes struct { Podcast *Podcast `protobuf:"bytes,1,opt,name=podcast,proto3" json:"podcast,omitempty"` Episode *Episode `protobuf:"bytes,2,opt,name=episode,proto3" json:"episode,omitempty"` Millis int64 `protobuf:"varint,3,opt,name=millis,proto3" json:"millis,omitempty"` // contains filtered or unexported fields }
func (*LastPlayedRes) Descriptor
deprecated
func (*LastPlayedRes) Descriptor() ([]byte, []int)
Deprecated: Use LastPlayedRes.ProtoReflect.Descriptor instead.
func (*LastPlayedRes) GetEpisode ¶
func (x *LastPlayedRes) GetEpisode() *Episode
func (*LastPlayedRes) GetMillis ¶
func (x *LastPlayedRes) GetMillis() int64
func (*LastPlayedRes) GetPodcast ¶
func (x *LastPlayedRes) GetPodcast() *Podcast
func (*LastPlayedRes) ProtoMessage ¶
func (*LastPlayedRes) ProtoMessage()
func (*LastPlayedRes) ProtoReflect ¶
func (x *LastPlayedRes) ProtoReflect() protoreflect.Message
func (*LastPlayedRes) Reset ¶
func (x *LastPlayedRes) Reset()
func (*LastPlayedRes) String ¶
func (x *LastPlayedRes) String() string
type LogoutReq ¶
type LogoutReq struct { SessionKey string `protobuf:"bytes,1,opt,name=sessionKey,proto3" json:"sessionKey,omitempty"` // contains filtered or unexported fields }
func (*LogoutReq) Descriptor
deprecated
func (*LogoutReq) GetSessionKey ¶
func (*LogoutReq) ProtoMessage ¶
func (*LogoutReq) ProtoMessage()
func (*LogoutReq) ProtoReflect ¶
func (x *LogoutReq) ProtoReflect() protoreflect.Message
type LogoutRes ¶
type LogoutRes struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*LogoutRes) Descriptor
deprecated
func (*LogoutRes) GetSuccess ¶
func (*LogoutRes) ProtoMessage ¶
func (*LogoutRes) ProtoMessage()
func (*LogoutRes) ProtoReflect ¶
func (x *LogoutRes) ProtoReflect() protoreflect.Message
type Pod ¶
type Pod interface { // Podcast and Episodes GetPodcast(context.Context, *GetPodReq) (*Podcast, error) GetEpisodes(context.Context, *GetEpiReq) (*Episodes, error) // UserEpisode GetUserEpisode(context.Context, *GetUserEpiReq) (*UserEpisode, error) UpsertUserEpisode(context.Context, *UserEpisode) (*Response, error) // Subscriptions GetSubscriptions(context.Context, *GetSubReq) (*Subscriptions, error) // Misc. GetUserLastPlayed(context.Context, *GetUserLastPlayedReq) (*LastPlayedRes, error) }
func NewPodJSONClient ¶
func NewPodJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Pod
NewPodJSONClient creates a JSON client that implements the Pod interface. It communicates using JSON and can be configured with a custom HTTPClient.
func NewPodProtobufClient ¶
func NewPodProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Pod
NewPodProtobufClient creates a Protobuf client that implements the Pod interface. It communicates using Protobuf and can be configured with a custom HTTPClient.
type Podcast ¶
type Podcast struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Author string `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"` Episodic bool `protobuf:"varint,4,opt,name=episodic,proto3" json:"episodic,omitempty"` Summary string `protobuf:"bytes,5,opt,name=summary,proto3" json:"summary,omitempty"` Link string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"` Image *Image `protobuf:"bytes,7,opt,name=image,proto3" json:"image,omitempty"` Explicit string `protobuf:"bytes,8,opt,name=explicit,proto3" json:"explicit,omitempty"` Language string `protobuf:"bytes,9,opt,name=language,proto3" json:"language,omitempty"` Keywords []string `protobuf:"bytes,10,rep,name=Keywords,proto3" json:"Keywords,omitempty"` Category []*Category `protobuf:"bytes,11,rep,name=category,proto3" json:"category,omitempty"` PubDate *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=pubDate,proto3" json:"pubDate,omitempty"` LastBuildDate *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=lastBuildDate,proto3" json:"lastBuildDate,omitempty"` Rss string `protobuf:"bytes,14,opt,name=rss,proto3" json:"rss,omitempty"` // contains filtered or unexported fields }
func (*Podcast) Descriptor
deprecated
func (*Podcast) GetCategory ¶
func (*Podcast) GetEpisodic ¶
func (*Podcast) GetExplicit ¶
func (*Podcast) GetKeywords ¶
func (*Podcast) GetLanguage ¶
func (*Podcast) GetLastBuildDate ¶
func (x *Podcast) GetLastBuildDate() *timestamppb.Timestamp
func (*Podcast) GetPubDate ¶
func (x *Podcast) GetPubDate() *timestamppb.Timestamp
func (*Podcast) GetSummary ¶
func (*Podcast) ProtoMessage ¶
func (*Podcast) ProtoMessage()
func (*Podcast) ProtoReflect ¶
func (x *Podcast) ProtoReflect() protoreflect.Message
type RefPodReq ¶
type RefPodReq struct {
// contains filtered or unexported fields
}
func (*RefPodReq) Descriptor
deprecated
func (*RefPodReq) ProtoMessage ¶
func (*RefPodReq) ProtoMessage()
func (*RefPodReq) ProtoReflect ¶
func (x *RefPodReq) ProtoReflect() protoreflect.Message
type RefPodRes ¶
type RefPodRes struct {
// contains filtered or unexported fields
}
func (*RefPodRes) Descriptor
deprecated
func (*RefPodRes) ProtoMessage ¶
func (*RefPodRes) ProtoMessage()
func (*RefPodRes) ProtoReflect ¶
func (x *RefPodRes) ProtoReflect() protoreflect.Message
type Request ¶
type Request struct { //string token = 1; PodcastID string `protobuf:"bytes,2,opt,name=podcastID,proto3" json:"podcastID,omitempty"` EpisodeID string `protobuf:"bytes,3,opt,name=episodeID,proto3" json:"episodeID,omitempty"` Start int64 `protobuf:"varint,4,opt,name=start,proto3" json:"start,omitempty"` End int64 `protobuf:"varint,5,opt,name=end,proto3" json:"end,omitempty"` // contains filtered or unexported fields }
start & end represent the amount of episodes to return
func (*Request) Descriptor
deprecated
func (*Request) GetEpisodeID ¶
func (*Request) GetPodcastID ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetMessage ¶
func (*Response) GetSuccess ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type Session ¶
type Session struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` SessionKey string `protobuf:"bytes,3,opt,name=sessionKey,proto3" json:"sessionKey,omitempty"` LoginTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=loginTime,proto3" json:"loginTime,omitempty"` LastSeenTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=lastSeenTime,proto3" json:"lastSeenTime,omitempty"` Expires *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expires,proto3" json:"expires,omitempty"` UserAgent string `protobuf:"bytes,7,opt,name=userAgent,proto3" json:"userAgent,omitempty"` // contains filtered or unexported fields }
func (*Session) Descriptor
deprecated
func (*Session) GetExpires ¶
func (x *Session) GetExpires() *timestamppb.Timestamp
func (*Session) GetLastSeenTime ¶
func (x *Session) GetLastSeenTime() *timestamppb.Timestamp
func (*Session) GetLoginTime ¶
func (x *Session) GetLoginTime() *timestamppb.Timestamp
func (*Session) GetSessionKey ¶
func (*Session) GetUserAgent ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type Subscription ¶
type Subscription struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` PodcastID string `protobuf:"bytes,3,opt,name=podcastID,proto3" json:"podcastID,omitempty"` CompletedIDs []string `protobuf:"bytes,4,rep,name=completedIDs,proto3" json:"completedIDs,omitempty"` InProgressIDs []string `protobuf:"bytes,5,rep,name=inProgressIDs,proto3" json:"inProgressIDs,omitempty"` // contains filtered or unexported fields }
func (*Subscription) Descriptor
deprecated
func (*Subscription) Descriptor() ([]byte, []int)
Deprecated: Use Subscription.ProtoReflect.Descriptor instead.
func (*Subscription) GetCompletedIDs ¶
func (x *Subscription) GetCompletedIDs() []string
func (*Subscription) GetId ¶
func (x *Subscription) GetId() string
func (*Subscription) GetInProgressIDs ¶
func (x *Subscription) GetInProgressIDs() []string
func (*Subscription) GetPodcastID ¶
func (x *Subscription) GetPodcastID() string
func (*Subscription) GetUserID ¶
func (x *Subscription) GetUserID() string
func (*Subscription) ProtoMessage ¶
func (*Subscription) ProtoMessage()
func (*Subscription) ProtoReflect ¶
func (x *Subscription) ProtoReflect() protoreflect.Message
func (*Subscription) Reset ¶
func (x *Subscription) Reset()
func (*Subscription) String ¶
func (x *Subscription) String() string
type Subscriptions ¶
type Subscriptions struct { Subscriptions []*Subscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` // contains filtered or unexported fields }
func (*Subscriptions) Descriptor
deprecated
func (*Subscriptions) Descriptor() ([]byte, []int)
Deprecated: Use Subscriptions.ProtoReflect.Descriptor instead.
func (*Subscriptions) GetSubscriptions ¶
func (x *Subscriptions) GetSubscriptions() []*Subscription
func (*Subscriptions) ProtoMessage ¶
func (*Subscriptions) ProtoMessage()
func (*Subscriptions) ProtoReflect ¶
func (x *Subscriptions) ProtoReflect() protoreflect.Message
func (*Subscriptions) Reset ¶
func (x *Subscriptions) Reset()
func (*Subscriptions) String ¶
func (x *Subscriptions) String() string
type TwirpServer ¶
type TwirpServer interface { http.Handler // ServiceDescriptor returns gzipped bytes describing the .proto file that // this service was generated from. Once unzipped, the bytes can be // unmarshalled as a // google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto. // // The returned integer is the index of this particular service within that // FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a // low-level field, expected to be used for reflection. ServiceDescriptor() ([]byte, int) // ProtocGenTwirpVersion is the semantic version string of the version of // twirp used to generate this file. ProtocGenTwirpVersion() string // PathPrefix returns the HTTP URL path prefix for all methods handled by this // service. This can be used with an HTTP mux to route Twirp requests. // The path prefix is in the form: "/<prefix>/<package>.<Service>/" // that is, everything in a Twirp route except for the <Method> at the end. PathPrefix() string }
TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for accessing metadata about the service. Those accessors are a low-level API for building reflection tools. Most people can think of TwirpServers as just http.Handlers.
func NewAdminServer ¶
func NewAdminServer(svc Admin, opts ...interface{}) TwirpServer
NewAdminServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).
func NewAuthServer ¶
func NewAuthServer(svc Auth, opts ...interface{}) TwirpServer
NewAuthServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).
func NewPodServer ¶
func NewPodServer(svc Pod, opts ...interface{}) TwirpServer
NewPodServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` //string password = 4; DOB *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=DOB,proto3" json:"DOB,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetDOB ¶
func (x *User) GetDOB() *timestamppb.Timestamp
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserEpisode ¶
type UserEpisode struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` EpisodeID string `protobuf:"bytes,2,opt,name=episodeID,proto3" json:"episodeID,omitempty"` Offset int64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` LastSeen *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=lastSeen,proto3" json:"lastSeen,omitempty"` Played bool `protobuf:"varint,5,opt,name=played,proto3" json:"played,omitempty"` // contains filtered or unexported fields }
func (*UserEpisode) Descriptor
deprecated
func (*UserEpisode) Descriptor() ([]byte, []int)
Deprecated: Use UserEpisode.ProtoReflect.Descriptor instead.
func (*UserEpisode) GetEpisodeID ¶
func (x *UserEpisode) GetEpisodeID() string
func (*UserEpisode) GetLastSeen ¶
func (x *UserEpisode) GetLastSeen() *timestamppb.Timestamp
func (*UserEpisode) GetOffset ¶
func (x *UserEpisode) GetOffset() int64
func (*UserEpisode) GetPlayed ¶
func (x *UserEpisode) GetPlayed() bool
func (*UserEpisode) GetUserID ¶
func (x *UserEpisode) GetUserID() string
func (*UserEpisode) ProtoMessage ¶
func (*UserEpisode) ProtoMessage()
func (*UserEpisode) ProtoReflect ¶
func (x *UserEpisode) ProtoReflect() protoreflect.Message
func (*UserEpisode) Reset ¶
func (x *UserEpisode) Reset()
func (*UserEpisode) String ¶
func (x *UserEpisode) String() string