api

package
v0.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const API_VERSION = "1.2"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthPFAnchorResponse

type AuthPFAnchorResponse struct {
	Anchors    authpf.AnchorsDB `json:"anchors"`
	ServerTime time.Time        `json:"server_time"`
}

AuthPFAnchorResponse represents all rules with server time for client-side calculations

type Handler

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

func New

func New(db *authpf.AnchorsDB, lock *sync.Mutex, logger zerolog.Logger, config *config.ConfigFile) (*Handler, error)

func (*Handler) AddToDB

func (h *Handler) AddToDB(r *authpf.AuthPFAnchor) error

func (*Handler) CallExecActivateAnchor

func (h *Handler) CallExecActivateAnchor(c echo.Context, r *authpf.AuthPFAnchor) *errors.APIError

Call Exec activate anchor

func (*Handler) CallExecDeactivateAllAnchors

func (h *Handler) CallExecDeactivateAllAnchors(r *authpf.AuthPFAnchor) *errors.APIError

func (*Handler) CallExecDeactivateAnchor

func (h *Handler) CallExecDeactivateAnchor(r *authpf.AuthPFAnchor) *errors.APIError

func (*Handler) CheckAnchorIsActivated

func (h *Handler) CheckAnchorIsActivated(c echo.Context) (bool, *errors.APIError)

func (*Handler) CheckJSONPayload

func (h *Handler) CheckJSONPayload(c echo.Context, r *authpf.AuthPFAnchor) *errors.APIError

Check if AuthPFAnchor can be bind to payload

func (*Handler) CheckSessionUserIP

func (h *Handler) CheckSessionUserIP(c echo.Context) *errors.APIError

func (*Handler) CheckSessionUserPermission

func (h *Handler) CheckSessionUserPermission(c echo.Context, action string) *errors.APIError

Validate User role permissions

func (*Handler) CheckSessionUsername

func (h *Handler) CheckSessionUsername(c echo.Context) *errors.APIError

Check Username and JSON Payload

func (*Handler) GetAnchorFromContext

func (h *Handler) GetAnchorFromContext(c echo.Context) (*authpf.AuthPFAnchor, *errors.APIError)

Fill anchor struct by using context informations

func (*Handler) HandleDeleteAllDeactivate

func (h *Handler) HandleDeleteAllDeactivate(c echo.Context) error

func (*Handler) HandleDeleteDeactivate

func (h *Handler) HandleDeleteDeactivate(c echo.Context) error

func (*Handler) HandleGetActivate

func (h *Handler) HandleGetActivate(c echo.Context) error

func (*Handler) HandleGetAllActivePFAnchors

func (h *Handler) HandleGetAllActivePFAnchors(c echo.Context) error

func (*Handler) HandleGetLogin

func (h *Handler) HandleGetLogin(c echo.Context) error

func (*Handler) HandlePostActivate

func (h *Handler) HandlePostActivate(c echo.Context) error

HandlerFunc for activate Anchors (POST /api/v1/authpf/activate)

Jump to

Keyboard shortcuts

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