shieldeddotdev

package module
v0.0.0-...-d31aa54 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 21 Imported by: 0

README

shieldeddotdev

Go Report Card Last Update

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedColor = errors.New("unsupported color")
View Source
var StaticAssets fs.FS = os.DirFS("static")

StaticAssets is a static site asset filesystem

Functions

func NormalizeColor

func NormalizeColor(color string) (string, error)

Types

type ApiHandler

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

func NewApiHandler

func NewApiHandler(sm *model.ShieldMapper, imgHost string) *ApiHandler

func (*ApiHandler) HandlePOST

func (ah *ApiHandler) HandlePOST(w http.ResponseWriter, r *http.Request)

type DashboardShieldApiHandler

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

func NewDashboardShieldApiHandler

func NewDashboardShieldApiHandler(sm *model.ShieldMapper, jwtAuth *JwtAuth) *DashboardShieldApiHandler

func (*DashboardShieldApiHandler) HandleDELETE

func (sah *DashboardShieldApiHandler) HandleDELETE(w http.ResponseWriter, r *http.Request)

func (*DashboardShieldApiHandler) HandlePUT

type DashboardShieldApiIndexHandler

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

func NewDashboardShieldApiIndexHandler

func NewDashboardShieldApiIndexHandler(sm *model.ShieldMapper, jwtAuth *JwtAuth) *DashboardShieldApiIndexHandler

func (*DashboardShieldApiIndexHandler) HandleGET

func (*DashboardShieldApiIndexHandler) HandlePOST

type DebugAuthHandler

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

func NewDebugAuthHandler

func NewDebugAuthHandler(um *model.UserMapper, jwtAuth *JwtAuth) *DebugAuthHandler

func (*DebugAuthHandler) LoginHandler

func (ah *DebugAuthHandler) LoginHandler(w http.ResponseWriter, r *http.Request)

type GitHubAuthHandler

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

func NewGitHubAuthHandler

func NewGitHubAuthHandler(um *model.UserMapper, clientID string, clientSecret string, jwtAuth *JwtAuth) *GitHubAuthHandler

func (*GitHubAuthHandler) CallbackHandler

func (ah *GitHubAuthHandler) CallbackHandler(w http.ResponseWriter, r *http.Request)

func (*GitHubAuthHandler) LoginHandler

func (ah *GitHubAuthHandler) LoginHandler(w http.ResponseWriter, r *http.Request)

type JwtAuth

type JwtAuth struct {
	Secret []byte
}

func (*JwtAuth) Authorize

func (j *JwtAuth) Authorize(w http.ResponseWriter, uid int64) error

func (*JwtAuth) GetAuth

func (j *JwtAuth) GetAuth(r *http.Request) *int64

type ShieldHandler

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

func NewShieldHandler

func NewShieldHandler(sm *model.ShieldMapper) *ShieldHandler

func (*ShieldHandler) ServeHTTP

func (sh *ShieldHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type StaticShieldHandler

type StaticShieldHandler struct{}

func (*StaticShieldHandler) ServeHTTP

func (ssh *StaticShieldHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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