status

package
v0.0.0-...-a11cca7 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	None      = 0
	Draft     = 1
	Suspended = 50
	Published = 100
)

Status values valid in the status field added with status.ResourceStatus.

Variables

This section is empty.

Functions

func Options

func Options() []helpers.Option

Options returns an array of statuses for a status select.

func OptionsAll

func OptionsAll(name string) []helpers.Option

OptionsAll returns a list of options starting with a None option using the name passed in, which is useful for filter menus filtering on status.

func WherePublished

func WherePublished(q *query.Query) *query.Query

WherePublished modifies the given query to select status greater than published. Note this selects >= Published.

Types

type ResourceStatus

type ResourceStatus struct {
	Status int64
}

ResourceStatus adds a status field to resources.

func (*ResourceStatus) StatusDisplay

func (r *ResourceStatus) StatusDisplay() string

StatusDisplay returns a string representation of the model status.

func (*ResourceStatus) StatusOptions

func (r *ResourceStatus) StatusOptions() []helpers.Option

StatusOptions returns an array of statuses for a status select for this resource.

Jump to

Keyboard shortcuts

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