utils

package
v0.1.54 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShowTeamUrlFormat                   = "/teams/%s"
	DeleteTeamUrlFormat                 = "/teams/%s"
	ShowAccountUrlFormat                = "/accounts/%s"
	DeleteAccountUrlFormat              = "/accounts/%s"
	DeleteOperatorUrlFormat             = "/operators/%s"
	DeleteUserUrlFormat                 = "/users/%s"
	DownloadTokenAccountUrl             = "/accounts/%s/token"
	DownloadTokenOperatorUrl            = "/operators/%s/token"
	DownloadTokenUserUrl                = "/users/%s/token"
	DownloadCredentialsUserUrlFormat    = "/users/%s/credentials"
	EdtiTeamsUrlFormat                  = "/teams/%s/edit"
	ShowSystemUrlFormat                 = "/systems/%s"
	ShowOperatorUrlFormat               = "/operators/%s"
	GetDashboardStatsAccountsUrlFormat  = "/stats/accounts"
	GetDashboardStatsOperatorsUrlFormat = "/stats/operators"
	GetDashboardStatsSystemsUrlFormat   = "/stats/systems"
	GetDashboardStatsUsersUrlFormat     = "/stats/users"
	GetDashboardStatsTeamsUrlFormat     = "/stats/teams"
)

Variables

View Source
var DefaultErrorHandler = func(c *fiber.Ctx, err error) error {
	code := fiber.StatusInternalServerError
	message := err.Error()

	// retrieve the custom error code if it's a *fiber.Error
	var e *fiber.Error
	if errors.As(err, &e) {
		code = e.Code
	}

	return c.Status(code).JSON(fiber.Map{"error": message, "code": code})
}

DefaultErrorHandler is the default error handler.

Functions

func CreateNKeyPair

func CreateNKeyPair(p nkeys.PrefixByte) (nkeys.KeyPair, error)

CreateNKeyPair creates a new NKey pair.

Types

This section is empty.

Jump to

Keyboard shortcuts

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