model

package
v0.0.0-...-a14a4d2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Robot

type Robot struct {
	ID           int64     `orm:"pk;auto;column(id)" json:"id"`
	Name         string    `orm:"column(name)" json:"name" sort:"default"`
	Description  string    `orm:"column(description)" json:"description"`
	Secret       string    `orm:"column(secret)" json:"secret"`
	Salt         string    `orm:"column(salt)" json:"-"`
	Duration     int64     `orm:"column(duration)" json:"duration"`
	ProjectID    int64     `orm:"column(project_id)" json:"project_id"`
	ExpiresAt    int64     `orm:"column(expiresat)" json:"expires_at"`
	Disabled     bool      `orm:"column(disabled)" json:"disabled"`
	Visible      bool      `orm:"column(visible)" json:"-"`
	CreatorRef   int64     `orm:"column(creator_ref)" json:"creator_ref"`
	CreatorType  string    `orm:"column(creator_type)" json:"creator_type"`
	CreationTime time.Time `orm:"column(creation_time);auto_now_add" json:"creation_time"`
	UpdateTime   time.Time `orm:"column(update_time);auto_now" json:"update_time"`
}

Robot holds the details of a robot.

func (*Robot) FromJSON

func (r *Robot) FromJSON(jsonData string) error

FromJSON parses robot from json data

func (*Robot) TableName

func (r *Robot) TableName() string

TableName ...

func (*Robot) ToJSON

func (r *Robot) ToJSON() (string, error)

ToJSON marshals Robot to JSON data

Jump to

Keyboard shortcuts

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