backend

package
v0.0.0-...-305dc57 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

README

backend

migrate create -ext sql -dir db/migrations -seq create_initial_tables
sqlc generate
migrate -database "postgres://mootslive:mootslive@localhost:5432/mootslive" -path db/migrations up

Helpful resources:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthEngine

func NewAuthEngine(signingKey []byte, queries db.TXQuerier) *authEngine

Types

type AdminServerHandler

type AdminServerHandler struct {
	mootslivepbv1connect.UnimplementedAdminServiceHandler
}

func (*AdminServerHandler) GetStatus

func (as *AdminServerHandler) GetStatus(
	ctx context.Context,
	req *connect.Request[mootslivepbv1.GetStatusRequest],
) (*connect.Response[mootslivepbv1.GetStatusResponse], error)

type SpotifyPoller

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

func NewSpotifyPoller

func NewSpotifyPoller(log *slog.Logger, queries db.TXQuerier) *SpotifyPoller

func (*SpotifyPoller) Run

func (sp *SpotifyPoller) Run(ctx context.Context) error

func (*SpotifyPoller) ScanAccount

func (sp *SpotifyPoller) ScanAccount(
	ctx context.Context, spotifyUserID string,
) error

type UserServiceHandler

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

func NewUserServiceHandler

func NewUserServiceHandler(
	queries db.TXQuerier,
	log *slog.Logger,
	authEngine *authEngine,
) *UserServiceHandler

func (*UserServiceHandler) BeginTwitterAuth

func (us *UserServiceHandler) BeginTwitterAuth(
	ctx context.Context,
	req *connect.Request[mootslivepbv1.BeginTwitterAuthRequest],
) (*connect.Response[mootslivepbv1.BeginTwitterAuthResponse], error)

func (*UserServiceHandler) FinishTwitterAuth

func (us *UserServiceHandler) FinishTwitterAuth(
	ctx context.Context,
	req *connect.Request[mootslivepbv1.FinishTwitterAuthRequest],
) (*connect.Response[mootslivepbv1.FinishTwitterAuthResponse], error)

func (*UserServiceHandler) GetMe

func (us *UserServiceHandler) GetMe(
	ctx context.Context,
	req *connect.Request[mootslivepbv1.GetMeRequest],
) (*connect.Response[mootslivepbv1.GetMeResponse], error)

func (*UserServiceHandler) ListListens

func (us *UserServiceHandler) ListListens(
	ctx context.Context,
	req *connect.Request[mootslivepbv1.ListListensRequest],
) (*connect.Response[mootslivepbv1.ListListensResponse], error)

Directories

Path Synopsis
cmd
sak

Jump to

Keyboard shortcuts

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