server

package
v0.0.0-...-8897277 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	SkippedWeeks() ([]stronk.SkippedWeek, error)
	SkipWeek(note string, week, iter int) error

	SetTrainingMaxes(press, squat, bench, deadlift stronk.Weight) error
	TrainingMaxes() ([]*stronk.TrainingMax, error)

	SetSmallestDenom(small stronk.Weight) error
	SmallestDenom() (stronk.Weight, error)

	RecordLift(ex stronk.Exercise, st stronk.SetType, weight stronk.Weight, set int, reps int, note string, day, week, iter int, toFailure bool) (stronk.LiftID, error)

	Lift(id stronk.LiftID) (*stronk.Lift, error)
	EditLift(id stronk.LiftID, note string, reps int) error
	RecentLifts() ([]*stronk.Lift, error)
	ComparableLifts(ex stronk.Exercise, weight stronk.Weight) (*stronk.ComparableLifts, error)
	RecentFailureSets() ([]*stronk.Lift, error)
}

type SecureCookie

type SecureCookie interface {
	Encode(name string, value interface{}) (string, error)
	Decode(name, value string, dst interface{}) error
	UseSecure() bool
}

SecureCookie represents anything that knows how to encode and decode cookies intended to be stored in a user's browser.

type Server

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

func New

func New(routine *stronk.Routine, db DB) *Server

func (*Server) ServeHTTP

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

Jump to

Keyboard shortcuts

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