appstate

package
v1.16.6 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAppStateContent

func GetAppStateContent(key string) (content string, err error)

GetAppStateContent gets an app state from database

func SaveAppStateContent

func SaveAppStateContent(key, content string) error

SaveAppStateContent saves the app state item to database

Types

type AppState

type AppState struct {
	ID       string `xorm:"pk varchar(200)"`
	Revision int64
	Content  string `xorm:"LONGTEXT"`
}

AppState represents a state record in database if one day we would make Gitea run as a cluster, we can introduce a new field `Scope` here to store different states for different nodes

Jump to

Keyboard shortcuts

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