http

package
v0.0.0-...-0a0123b Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(New)

Functions

This section is empty.

Types

type Store

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

func New

func New(s *db.Service) (*Store, error)

func (*Store) GetChalState

func (s *Store) GetChalState(ctx context.Context, chalID string) any

func (*Store) GetUserFromSession

func (s *Store) GetUserFromSession(ctx context.Context) (uint, string, error)

GetUserFromSession will get the user id from the session store located in the context.

func (*Store) LoadAndSave

func (s *Store) LoadAndSave(next http.Handler) http.Handler

func (*Store) RemoveChalState

func (s *Store) RemoveChalState(ctx context.Context, chalID string)

func (*Store) RemoveUserFromSession

func (s *Store) RemoveUserFromSession(ctx context.Context)

func (*Store) SetChalState

func (s *Store) SetChalState(ctx context.Context, chalID string, state any)

func (*Store) SetUserForSession

func (s *Store) SetUserForSession(ctx context.Context, userID uint, userType string)

SetUserForSession will set the user id in the session store located in the context.

Jump to

Keyboard shortcuts

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