libs

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigRoute

func ConfigRoute(c echo.Context) error

func Decrypt

func Decrypt(encryptedString string, keyString string) (decryptedString string)

func Encrypt

func Encrypt(stringToEncrypt string, keyString string) (encryptedString string)

func GenerateKey

func GenerateKey() string

func GenerateTemporaryUserPassword

func GenerateTemporaryUserPassword() string

func GetUserRoles

func GetUserRoles(userGroups []string) []string

func HealthRoute

func HealthRoute(c echo.Context) error

func MainRoute

func MainRoute(c echo.Context) error

func UpsertUser

func UpsertUser(username string, elasticsearchUser ElasticsearchUser)

Types

type ElasticsearchConnectionDetails

type ElasticsearchConnectionDetails struct {
	URL      string
	Username string
	Password string
}

type ElasticsearchUser

type ElasticsearchUser struct {
	Enabled  bool                      `json:"enabled"`
	Email    string                    `json:"email"`
	Password string                    `json:"password"`
	Metadata ElasticsearchUserMetadata `json:"metadata"`
	FullName string                    `json:"full_name"`
	Roles    []string                  `json:"roles"`
}

type ElasticsearchUserMetadata

type ElasticsearchUserMetadata struct {
	Groups []string `json:"groups"`
}

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
	Code    int    `json:"code"`
}

type HealthResponse

type HealthResponse struct {
	Status string `json:"status"`
}

Jump to

Keyboard shortcuts

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