controllers

package
v0.0.0-...-31dfc4c Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateEntryRequestBody

type CreateEntryRequestBody struct {
	UserSlug   string          `json:"user_slug"`
	VaultSlug  string          `json:"vault_slug"`
	EntryTitle string          `json:"entry_title"`
	Secrets    []reqBodySecret `json:"secrets"`
}

type CreateSecretRequestBody

type CreateSecretRequestBody struct {
	UserSlug     string `json:"user_slug"`
	VaultSlug    string `json:"vault_slug"`
	EntrySlug    string `json:"entry_slug"`
	SecretLabel  string `json:"secret_label"`
	SecretString string `json:"secret_string"`
}

type CreateUserRequestBody

type CreateUserRequestBody struct {
	Slug string `json:"user_slug"`
}

type CreateVaultRequestBody

type CreateVaultRequestBody struct {
	UserSlug   string `json:"user_slug"`
	VaultTitle string `json:"vault_title"`
}

type Handler

type Handler struct {
	DB   *gorm.DB
	Conf *config.AppConfig
}

func (Handler) AuthorizeRequest

func (H Handler) AuthorizeRequest(c *fiber.Ctx) error

func (Handler) CreateEntry

func (H Handler) CreateEntry(c *fiber.Ctx) error

func (Handler) CreateSecret

func (H Handler) CreateSecret(c *fiber.Ctx) error

func (Handler) CreateUser

func (H Handler) CreateUser(c *fiber.Ctx) error

func (Handler) CreateVault

func (H Handler) CreateVault(c *fiber.Ctx) error

func (Handler) DeleteEntry

func (H Handler) DeleteEntry(c *fiber.Ctx) error

func (Handler) DeleteSecret

func (H Handler) DeleteSecret(c *fiber.Ctx) error

func (Handler) DeleteVault

func (H Handler) DeleteVault(c *fiber.Ctx) error

func (Handler) ListVaults

func (H Handler) ListVaults(c *fiber.Ctx) error

func (Handler) MoveSecret

func (H Handler) MoveSecret(c *fiber.Ctx) error

func (Handler) Restricted

func (H Handler) Restricted(c *fiber.Ctx) error

func (Handler) RetrieveEntry

func (H Handler) RetrieveEntry(c *fiber.Ctx) error

func (Handler) RetrieveVault

func (H Handler) RetrieveVault(c *fiber.Ctx) error

func (Handler) UpdateEntry

func (H Handler) UpdateEntry(c *fiber.Ctx) error

func (Handler) UpdateSecret

func (H Handler) UpdateSecret(c *fiber.Ctx) error

func (Handler) UpdateVault

func (H Handler) UpdateVault(c *fiber.Ctx) error

type ListVaultsResponseBody

type ListVaultsResponseBody struct {
	Vaults []models.Vault `json:"vaults"`
}

type MoveSecretRequestBody

type MoveSecretRequestBody struct {
	Priority  string `json:"secret_priority"`
	EntrySlug string `json:"entry_slug"`
}

type UpdateEntryRequestBody

type UpdateEntryRequestBody struct {
	Title string `json:"entry_title"`
}

type UpdateSecretRequestBody

type UpdateSecretRequestBody struct {
	Label  string `json:"secret_label"`
	String string `json:"secret_string"`
}

type UpdateVaultRequestBody

type UpdateVaultRequestBody struct {
	Title string `json:"vault_title"`
}

Jump to

Keyboard shortcuts

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