Documentation ¶
Index ¶
- func DBInit(db *gorm.DB, sfn *snowflake.Node) (*gorm.DB, error)
- func ExtractBPM(p string) (float64, error)
- type Download
- type Opts
- type Service
- func (svc *Service) AuthFuncOverride(ctx context.Context, path string) (context.Context, error)
- func (svc *Service) Close()
- func (svc *Service) CloseDiscord(err error)
- func (svc *Service) CloseServer(err error)
- func (svc *Service) Me(ctx context.Context, req *sgtmpb.Me_Request) (*sgtmpb.Me_Response, error)
- func (svc *Service) Ping(context.Context, *sgtmpb.Ping_Request) (*sgtmpb.Ping_Response, error)
- func (svc *Service) PostList(context.Context, *sgtmpb.PostList_Request) (*sgtmpb.PostList_Response, error)
- func (svc *Service) ServerListenerAddr() string
- func (svc *Service) StartDiscord() error
- func (svc *Service) StartServer() error
- func (svc *Service) Status(context.Context, *sgtmpb.Status_Request) (*sgtmpb.Status_Response, error)
- func (svc *Service) UserList(context.Context, *sgtmpb.UserList_Request) (*sgtmpb.UserList_Response, error)
- type YoutubeDLOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractBPM ¶ added in v1.32.0
Types ¶
type Download ¶ added in v1.32.0
type Download struct { URL string Path string YoutubeDLFile string YoutubeDL YoutubeDLOutput }
type Opts ¶
type Opts struct { Context context.Context Logger *zap.Logger DevMode bool JWTSigningKey string Snowflake *snowflake.Node EnableDiscord bool DiscordToken string DiscordAdminChannel string DiscordClientID string DiscordClientSecret string SoundCloudClientID string DBPath string EnableServer bool ServerBind string ServerCORSAllowedOrigins string ServerRequestTimeout time.Duration ServerShutdownTimeout time.Duration ServerWithPprof bool Hostname string }
func DefaultOpts ¶
func DefaultOpts() Opts
type Service ¶
func (*Service) AuthFuncOverride ¶
func (*Service) CloseDiscord ¶
func (*Service) CloseServer ¶
func (*Service) Me ¶ added in v1.32.0
func (svc *Service) Me(ctx context.Context, req *sgtmpb.Me_Request) (*sgtmpb.Me_Response, error)
func (*Service) Ping ¶
func (svc *Service) Ping(context.Context, *sgtmpb.Ping_Request) (*sgtmpb.Ping_Response, error)
func (*Service) PostList ¶ added in v1.16.1
func (svc *Service) PostList(context.Context, *sgtmpb.PostList_Request) (*sgtmpb.PostList_Response, error)
func (*Service) ServerListenerAddr ¶
func (*Service) StartDiscord ¶
func (*Service) StartServer ¶
func (*Service) Status ¶
func (svc *Service) Status(context.Context, *sgtmpb.Status_Request) (*sgtmpb.Status_Response, error)
func (*Service) UserList ¶ added in v1.16.1
func (svc *Service) UserList(context.Context, *sgtmpb.UserList_Request) (*sgtmpb.UserList_Response, error)
type YoutubeDLOutput ¶ added in v1.32.0
type YoutubeDLOutput struct { Extractor string `json:"extractor"` Protocol string `json:"protocol"` UploadDate string `json:"upload_date"` LikeCount int `json:"like_count"` Duration float64 `json:"duration"` Fulltitle string `json:"fulltitle"` PlaylistIndex interface{} `json:"playlist_index"` ViewCount int `json:"view_count"` Playlist interface{} `json:"playlist"` Title string `json:"title"` Filename string `json:"_filename"` Abr int `json:"abr"` ID string `json:"id"` CommentCount int `json:"comment_count"` UploaderURL string `json:"uploader_url"` Thumbnail string `json:"thumbnail"` WebpageURLBasename string `json:"webpage_url_basename"` DisplayID string `json:"display_id"` Description string `json:"description"` Format string `json:"format"` Timestamp int `json:"timestamp"` Preference interface{} `json:"preference"` Uploader string `json:"uploader"` Genre string `json:"genre"` FormatID string `json:"format_id"` UploaderID string `json:"uploader_id"` Thumbnails []struct { URL string `json:"url"` Width int `json:"width,omitempty"` Resolution string `json:"resolution,omitempty"` ID string `json:"id"` Height int `json:"height,omitempty"` Preference int `json:"preference,omitempty"` } `json:"thumbnails"` License string `json:"license"` URL string `json:"url"` ExtractorKey string `json:"extractor_key"` Vcodec string `json:"vcodec"` HTTPHeaders struct { AcceptCharset string `json:"Accept-Charset"` AcceptLanguage string `json:"Accept-Language"` AcceptEncoding string `json:"Accept-Encoding"` Accept string `json:"Accept"` UserAgent string `json:"User-Agent"` } `json:"http_headers"` RepostCount int `json:"repost_count"` Ext string `json:"ext"` WebpageURL string `json:"webpage_url"` Formats []struct { Ext string `json:"ext"` Protocol string `json:"protocol"` Preference interface{} `json:"preference"` Vcodec string `json:"vcodec"` Format string `json:"format"` URL string `json:"url"` FormatID string `json:"format_id"` HTTPHeaders struct { AcceptCharset string `json:"Accept-Charset"` AcceptLanguage string `json:"Accept-Language"` AcceptEncoding string `json:"Accept-Encoding"` Accept string `json:"Accept"` UserAgent string `json:"User-Agent"` } `json:"http_headers"` Abr int `json:"abr"` } `json:"formats"` }
Click to show internal directories.
Click to hide internal directories.