controllers

package
v0.0.0-...-ee7fb9c Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthFirstFactorRequestBody

type AuthFirstFactorRequestBody struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type AuthFirstFactorResponseBody

type AuthFirstFactorResponseBody struct {
	MFAToken string `json:"mfa_token"`
	TestOTP  string `json:"test_otp,omitempty"`
}

type AuthSecondFactorRequestBody

type AuthSecondFactorRequestBody struct {
	MFAToken string `json:"mfa_token"`
	PhoneOTP string `json:"phone_otp"`
}

type AuthSecondFactorResponseBody

type AuthSecondFactorResponseBody struct {
	Token string      `json:"token"`
	User  models.User `json:"user"`
}

type CreateAccountRequestBody

type CreateAccountRequestBody struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	Phone    string `json:"phone"`
	Password string `json:"password"`
}

type CreateAccountResponseBody

type CreateAccountResponseBody struct {
	Token string      `json:"token"`
	User  models.User `json:"user"`
}

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"`
	SecretPriority uint8  `json:"secret_priority"`
}

type CreateVaultRequestBody

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

type Handler

type Handler struct {
	DBs  *databases.Databases
	Conf *config.AppConfig
}

func (Handler) AuthFirstFactor

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

func (Handler) AuthSecondFactor

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

func (Handler) AuthorizeRequest

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

func (Handler) CheckUserIsVerified

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

func (Handler) CreateAccount

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

func (Handler) LogoutAccount

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

func (Handler) Restricted

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

func (Handler) RetrieveUser

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

func (Handler) VaultsCreateEntry

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

func (Handler) VaultsCreateSecret

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

func (Handler) VaultsCreateVault

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

func (Handler) VaultsDeleteEntry

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

func (Handler) VaultsDeleteSecret

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

func (Handler) VaultsDeleteVault

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

func (Handler) VaultsListVaults

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

func (Handler) VaultsMoveSecret

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

func (Handler) VaultsRetrieveEntry

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

func (Handler) VaultsRetrieveVault

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

func (Handler) VaultsUpdateEntry

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

func (Handler) VaultsUpdateSecret

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

func (Handler) VaultsUpdateVault

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

func (Handler) VerifyEmailConfirm

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

func (Handler) VerifyEmailTry

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

func (Handler) VerifyPhoneConfirm

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

func (Handler) VerifyPhoneTry

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

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"`
}

type VerifyEmailTryResponseBody

type VerifyEmailTryResponseBody struct {
	TestEmailToken string `json:"test_email_token,omitempty"`
	TestOTP        string `json:"test_otp,omitempty"`
}

Jump to

Keyboard shortcuts

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