object

package
v0.0.0-...-b377c4f Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDataset

func AddDataset(dataset *Dataset) bool

func DeleteDataset

func DeleteDataset(dataset *Dataset) bool

func InitAdapter

func InitAdapter()

func InitConfig

func InitConfig()

func UpdateDataset

func UpdateDataset(id string, dataset *Dataset) bool

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter represents the MySQL adapter for policy storage.

func NewAdapter

func NewAdapter(driverName string, dataSourceName string) *Adapter

NewAdapter is the constructor for Adapter.

type Dataset

type Dataset struct {
	Owner       string `xorm:"varchar(100) notnull pk" json:"owner"`
	Name        string `xorm:"varchar(100) notnull pk" json:"name"`
	CreatedTime string `xorm:"varchar(100)" json:"createdTime"`

	StartDate string `xorm:"varchar(100)" json:"startDate"`
	EndDate   string `xorm:"varchar(100)" json:"endDate"`
	FullName  string `xorm:"varchar(100)" json:"fullName"`
	Organizer string `xorm:"varchar(100)" json:"organizer"`
	Location  string `xorm:"varchar(100)" json:"location"`
	Address   string `xorm:"varchar(100)" json:"address"`
	Status    string `xorm:"varchar(100)" json:"status"`
	Language  string `xorm:"varchar(100)" json:"language"`

	Tags        []string    `xorm:"mediumtext" json:"tags"`
	Carousels   []string    `xorm:"mediumtext" json:"carousels"`
	IntroText   string      `xorm:"mediumtext" json:"introText"`
	DefaultItem string      `xorm:"mediumtext" json:"defaultItem"`
	TreeItems   []*TreeItem `xorm:"mediumtext" json:"treeItems"`
}

func GetDataset

func GetDataset(id string) *Dataset

func GetDatasets

func GetDatasets(owner string) []*Dataset

func GetGlobalDatasets

func GetGlobalDatasets() []*Dataset

type TreeItem

type TreeItem struct {
	Key       string      `xorm:"varchar(100)" json:"key"`
	Title     string      `xorm:"varchar(100)" json:"title"`
	Content   string      `xorm:"mediumtext" json:"content"`
	TitleEn   string      `xorm:"varchar(100)" json:"titleEn"`
	ContentEn string      `xorm:"mediumtext" json:"contentEn"`
	Children  []*TreeItem `xorm:"varchar(1000)" json:"children"`
}

Jump to

Keyboard shortcuts

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