setting_plugin

package
v0.0.0-...-ea214e1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminCreateAction

func AdminCreateAction(c *gin.Context)

func AdminIndexAction

func AdminIndexAction(c *gin.Context)

func AdminUpdateAction

func AdminUpdateAction(c *gin.Context)

func MapAction

func MapAction(c *gin.Context)

func Routes

func Routes(r *gin.RouterGroup)

func UpdateSetting

func UpdateSetting(id int64, key string, val string) bool

Types

type CreateParams

type CreateParams struct {
	Data []Item `json:"data"`
}

type Item

type Item struct {
	Key string `json:"key"`
	Val string `json:"val"`
}

type Setting

type Setting struct {
	Id int64

	Key string
	Val string

	CreatedAt time.Time
	UpdatedAt time.Time
}

func CreateSetting

func CreateSetting(key string, val string) (*Setting, error)

func (Setting) TableName

func (s Setting) TableName() string

type SettingResp

type SettingResp struct {
	Id int64

	Key string
	Val string

	CreatedAt utils.Timestamp
	UpdatedAt utils.Timestamp
}

func (SettingResp) Fields

func (sr SettingResp) Fields() []string

type UpdateItem

type UpdateItem struct {
	Id  int64  `json:"id"`
	Key string `json:"key"`
	Val string `json:"val"`
}

type UpdateParams

type UpdateParams struct {
	Data []UpdateItem `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳