api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotAuthenticated = errors.New("no authentication provided")
)

Functions

func AuthenticationMiddleware

func AuthenticationMiddleware(j jwt2.JWT) mux.MiddlewareFunc

Types

type AuthApiService

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

func (AuthApiService) AuthConfigurationGet

func (a AuthApiService) AuthConfigurationGet(ctx context.Context) (openapi.ImplResponse, error)

func (AuthApiService) AuthLoginPost

func (AuthApiService) AuthLogoutGet

func (a AuthApiService) AuthLogoutGet(ctx context.Context) (openapi.ImplResponse, error)

func (AuthApiService) AuthRefreshGet

func (a AuthApiService) AuthRefreshGet(ctx context.Context) (openapi.ImplResponse, error)

type Env

type Env int
const (
	Prod Env = iota
	Dev
)

type ImportApiServicer

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

func (ImportApiServicer) ImportLibraryPost

func (i ImportApiServicer) ImportLibraryPost(ctx context.Context) (openapi.ImplResponse, error)

func (ImportApiServicer) ImportLyricsGet

func (i ImportApiServicer) ImportLyricsGet(ctx context.Context) (openapi.ImplResponse, error)

func (ImportApiServicer) ImportLyricsPost

func (i ImportApiServicer) ImportLyricsPost(ctx context.Context) (openapi.ImplResponse, error)

func (ImportApiServicer) ImportLyricsTrackIdPost

func (i ImportApiServicer) ImportLyricsTrackIdPost(ctx context.Context, id string) (openapi.ImplResponse, error)

func (ImportApiServicer) ImportPlaylistIdPost

func (i ImportApiServicer) ImportPlaylistIdPost(ctx context.Context, playlistId string) (openapi.ImplResponse, error)

type Server

type Server struct {
	sync.Once
	// contains filtered or unexported fields
}

func NewServer

func NewServer(options ...ServerOptions) *Server

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ServerOptions

type ServerOptions func(s *Server)

func WithDatabase

func WithDatabase(repositories *db.Repositories) ServerOptions

func WithEnv

func WithEnv(env Env) ServerOptions

func WithGeniusAPI

func WithGeniusAPI(token string) ServerOptions

func WithLanguageDetector

func WithLanguageDetector(detector languageDetector) ServerOptions

func WithOAuth

func WithOAuth(clientId string, clientSecret string) ServerOptions

func WithReverseProxy

func WithReverseProxy(protocol, domain string, port int) ServerOptions

func WithSecret

func WithSecret(secret []byte) ServerOptions

type TracksApiService

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

func (*TracksApiService) TracksGet

func (s *TracksApiService) TracksGet(ctx context.Context, page int32, limit int32, query string) (openapi.ImplResponse, error)

func (*TracksApiService) TracksIdGet

func (s *TracksApiService) TracksIdGet(ctx context.Context, id string) (openapi.ImplResponse, error)

TracksIdGet - Returns a track

func (*TracksApiService) TracksIdPatch

func (s *TracksApiService) TracksIdPatch(ctx context.Context, id string, lyrics openapi.Lyrics) (openapi.ImplResponse, error)

func (*TracksApiService) TracksStatsGet

func (s *TracksApiService) TracksStatsGet(ctx context.Context) (openapi.ImplResponse, error)

Jump to

Keyboard shortcuts

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