kernel

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfMatch

func CheckIfMatch(w http.ResponseWriter, r *http.Request, version int64) bool

func DecodeJSON

func DecodeJSON(w http.ResponseWriter, r *http.Request, dst any) bool

func ETag

func ETag(version int64) string

func NewID

func NewID() uuid.UUID

func NormalizeEmail

func NormalizeEmail(value string) string

func RequestHash

func RequestHash(r *http.Request, body []byte) []byte

func RequestID

func RequestID(ctx context.Context) string

func WithActor

func WithActor(ctx context.Context, value Actor) context.Context

func WithRequestID

func WithRequestID(ctx context.Context, value string) context.Context

func WriteJSON

func WriteJSON(w http.ResponseWriter, status int, value any)

func WriteProblem

func WriteProblem(w http.ResponseWriter, r *http.Request, status int, code, detail string)

Types

type Actor

type Actor struct {
	Type          string   `json:"type"`
	ID            string   `json:"id,omitempty"`
	ApplicationID string   `json:"application_id,omitempty"`
	SessionID     string   `json:"session_id,omitempty"`
	Permissions   []string `json:"permissions,omitempty"`
	DelegatedBy   string   `json:"delegated_by,omitempty"`
}

func ActorFrom

func ActorFrom(ctx context.Context) (Actor, bool)

type Problem

type Problem struct {
	Type      string         `json:"type"`
	Title     string         `json:"title"`
	Status    int            `json:"status"`
	Detail    string         `json:"detail,omitempty"`
	Code      string         `json:"code"`
	RequestID string         `json:"request_id,omitempty"`
	Errors    map[string]any `json:"errors,omitempty"`
}

Jump to

Keyboard shortcuts

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