Project

package
v0.0.0-...-e0e71cc Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Kind contains Project kind name for DataStore.
	Kind = taxonomy.DataStoreKindProject
)

Variables

This section is empty.

Functions

func Add

func Add(ctx context.Context, vo ProjectVO.Instance)

Add creates new project entity in DataStore.

func Delete

func Delete()

Delete performs delete project entity.

func Update

func Update(ctx context.Context, vo ProjectVO.Instance)

Update performs update for project entity.

Types

type Entity

type Entity struct {
	Name     string `datastore:"name" json:"name"` // DataStore Key ID
	URL      string `datastore:"url" json:"url"`
	Method   string `datastore:"method,noindex" json:"method"`
	JSON     string `datastore:"json" json:"json"`
	Schedule int    `datastore:"schedule" json:"schedule"` // seconds
}

Entity describes Datastore project entity.

func Get

func Get(ctx context.Context, KeyID string) Entity

Get gets project entity.

func GetAll

func GetAll(ctx context.Context) []Entity

GetAll gets all available projects.

func (Entity) GetScheduleDuration

func (e Entity) GetScheduleDuration() time.Duration

GetScheduleDuration gets schedule value as time.Duration.

Jump to

Keyboard shortcuts

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