incept

package
v0.0.0-...-a17a3e0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2017 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TicketBucket = store.Bucket("tickets")

Functions

func CheckTicketExist

func CheckTicketExist(key Ticket) func(*bolt.Tx) error

func DeleteTickets

func DeleteTickets(ts ...Ticket) func(*bolt.Tx) error

func Incept

func Incept(
	key Ticket,
	l *auth.Login,
	db *bolt.DB,
) error

Incept checks that the given Ticket exists, and that the given User does not (by name.) Then it tries to create the given user, and delete the given key. Any error will cause this to roll back.

func InceptNoTicket

func InceptNoTicket(l *auth.Login, db *bolt.DB) error

InceptNoTicket is a method for admins to create a user without punching a Ticket.

func NewTicket

func NewTicket(t Ticket) func(*bolt.Tx) error

func NewTickets

func NewTickets(ts ...Ticket) func(*bolt.Tx) error

func PunchTicket

func PunchTicket(key Ticket) func(*bolt.Tx) error

Types

type ErrTicketMissing

type ErrTicketMissing string

func (ErrTicketMissing) Error

func (e ErrTicketMissing) Error() string

type Ticket

type Ticket uuid.UUID

func (Ticket) Bytes

func (t Ticket) Bytes() []byte

func (Ticket) MarshalJSON

func (t Ticket) MarshalJSON() ([]byte, error)

func (Ticket) String

func (t Ticket) String() string

func (*Ticket) UnmarshalJSON

func (t *Ticket) UnmarshalJSON(bs []byte) error

Jump to

Keyboard shortcuts

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