apitokenhttp

package
v0.0.0-...-1f1dc5f Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package apitokenhttp adapts API token HTTP requests to the token usecase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(group *echo.Group, handler *Handler)

Register mounts API token routes on group.

Types

type Handler

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

Handler adapts API token HTTP requests to the token usecase.

func New

func New(uc *usecase.Usecase, operation OperationRecorder) *Handler

New creates an API token HTTP handler.

func (*Handler) CreateToken

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

CreateToken creates an API token and returns the raw secret once.

func (*Handler) DeleteToken

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

DeleteToken revokes an API token.

func (*Handler) ListTokens

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

ListTokens returns token metadata without raw secrets or hashes.

func (*Handler) UpdateToken

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

UpdateToken updates token metadata without changing the secret.

type OperationRecorder

type OperationRecorder interface {
	RecordOperation(context.Context, auditusecase.OperationInput) (auditusecase.OperationLog, error)
}

OperationRecorder records API token mutations for audit.

Jump to

Keyboard shortcuts

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