handlers

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package handlers provides HTTP request handlers for the GSM emulator API endpoints.

Index

Constants

View Source
const Version = "1.0.0"

Version represents the current version of the GSM emulator.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthHandler

type HealthHandler struct{}

HealthHandler handles health check and readiness probe endpoints.

func NewHealthHandler

func NewHealthHandler() *HealthHandler

NewHealthHandler creates a new health handler instance.

func (*HealthHandler) Health

func (h *HealthHandler) Health(w http.ResponseWriter, _ *http.Request)

Health responds with the current health status of the emulator.

func (*HealthHandler) Ready

func (h *HealthHandler) Ready(w http.ResponseWriter, _ *http.Request)

Ready responds with the readiness status of the emulator.

type SecretsHandler

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

SecretsHandler handles HTTP requests for secret operations.

func NewSecretsHandler

func NewSecretsHandler(storage storage.Storage) *SecretsHandler

NewSecretsHandler creates a new SecretsHandler with the provided storage backend.

func (*SecretsHandler) CreateSecret

func (h *SecretsHandler) CreateSecret(w http.ResponseWriter, r *http.Request)

CreateSecret handles POST requests to create a new secret.

func (*SecretsHandler) DeleteSecret

func (h *SecretsHandler) DeleteSecret(w http.ResponseWriter, r *http.Request)

DeleteSecret handles DELETE requests to remove a secret.

TODO: Support ?etag

func (*SecretsHandler) GetSecret

func (h *SecretsHandler) GetSecret(w http.ResponseWriter, r *http.Request)

GetSecret handles GET requests to retrieve a secret by ID.

func (*SecretsHandler) ListSecrets

func (h *SecretsHandler) ListSecrets(w http.ResponseWriter, r *http.Request)

ListSecrets handles GET requests to list all secrets in a project.

type VersionsHandler

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

VersionsHandler handles HTTP requests for secret version operations.

func NewVersionsHandler

func NewVersionsHandler(storage storage.Storage) *VersionsHandler

NewVersionsHandler creates a new VersionsHandler with the provided storage backend.

func (*VersionsHandler) AccessSecretVersion

func (h *VersionsHandler) AccessSecretVersion(w http.ResponseWriter, r *http.Request)

AccessSecretVersion handles POST requests to access the data of a specific secret version.

func (*VersionsHandler) AddSecretVersion

func (h *VersionsHandler) AddSecretVersion(w http.ResponseWriter, r *http.Request)

AddSecretVersion handles POST requests to add a new version to an existing secret.

func (*VersionsHandler) DeleteSecretVersion

func (h *VersionsHandler) DeleteSecretVersion(w http.ResponseWriter, r *http.Request)

DeleteSecretVersion handles DELETE requests to remove a specific secret version.

func (*VersionsHandler) ListSecretVersions

func (h *VersionsHandler) ListSecretVersions(w http.ResponseWriter, r *http.Request)

ListSecretVersions handles GET requests to list all versions of a secret.

Jump to

Keyboard shortcuts

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