settings

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublicProfile = "public_profile"
)
View Source
const (
	TableName = "user_setting"
)

Variables

View Source
var ModelStruct = sqlbuilder.NewStruct(new(Model))

Functions

func Init

func Init(app *fiber.App, db *sql.DB) error

Types

type GetSettingsResponse

type GetSettingsResponse struct {
	Settings UserSettings `json:"settings"`
}

func T_GetSettings added in v0.11.0

func T_GetSettings(t *testing.T, app *fiber.App, o commontest.AuthOpts) (int, GetSettingsResponse)

type Model

type Model struct {
	Username string `db:"username" fieldtag:"required_insert"`
	Key      string `db:"key" fieldtag:"required_insert"`
	Value    string `db:"value" fieldtag:"required_insert"`
}

type UserSettings

type UserSettings struct {
	PublicProfile bool `json:"public_profile"`
}

type WriteSettingsRequest

type WriteSettingsRequest struct {
	Settings UserSettings `json:"settings"`
}

type WriteSettingsResponse

type WriteSettingsResponse struct {
	Success bool `json:"success"`
}

func T_WriteSettings added in v0.11.0

func T_WriteSettings(t *testing.T, app *fiber.App, b WriteSettingsRequest, o commontest.AuthOpts) (int, WriteSettingsResponse)

Jump to

Keyboard shortcuts

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