status

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2017 License: MIT 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 added in v1.0.1

func Options() []helpers.Option

Options returns an array of statuses for a status select.

func OptionsAll added in v1.0.1

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 added in v1.0.1

type ResourceStatus struct {
	Status int64
}

ResourceStatus adds a status field to resources.

func (*ResourceStatus) StatusDisplay added in v1.0.1

func (r *ResourceStatus) StatusDisplay() string

StatusDisplay returns a string representation of the model status.

func (*ResourceStatus) StatusOptions added in v1.0.1

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