Version: v1.2.1 Latest Latest

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

Go to latest
Published: Aug 11, 2017 License: MIT Imports: 2 Imported by: 0




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

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


This section is empty.


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.


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.

Source Files

Jump to

Keyboard shortcuts

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