containers

package
v0.0.0-...-8ba1b7e Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2019 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Entity
	Members []*Entity `pg:"many2many:container_members,joinFK:member"`
	// contains filtered or unexported fields
}

func ModelContainer

func ModelContainer(db orm.DB) (*Container, *orm.Query)

ModelContainer provides a(n initially empty) Entity receiver and base query.

func NewContainer

func NewContainer(
	resourceName ResourceName,
	name string,
	description string,
	ownerID EID,
	publiclyReadable bool,
	members []*Entity) *Container

func (*Container) AddMember

func (c *Container) AddMember(e *Entity) []*Entity

func (*Container) ArchiveRaw

func (c *Container) ArchiveRaw(db orm.DB) Terror

Archive updates a Container record in the DB. As Containers are logically abstract, one would typically only call this as part of another items archive sequence.

func (*Container) Clone

func (c *Container) Clone() *Container

func (*Container) CloneNew

func (c *Container) CloneNew() *Container

func (*Container) CreateRaw

func (c *Container) CreateRaw(db orm.DB) Terror

Create creates (or inserts) a new Container record into the DB. As Containers are logically abstract, one would typically only call this as part of another items create sequence.

func (*Container) GetMembers

func (c *Container) GetMembers() []*Entity

func (*Container) RemoveMember

func (c *Container) RemoveMember(t *Entity) (bool, []*Entity)

func (*Container) RemoveMemberAt

func (c *Container) RemoveMemberAt(i int) (bool, []*Entity)

func (*Container) SetMembers

func (c *Container) SetMembers(m []*Entity)

func (*Container) UpdateRaw

func (c *Container) UpdateRaw(db orm.DB) Terror

Update updates a container record in the DB. As Containers are logically abstract, one would typically only call this as part of another items update sequence.

type ContainerMembers

type ContainerMembers struct {
	ContainerID EID
	Member      EID
}

Jump to

Keyboard shortcuts

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