model

package
v0.0.0-...-3d0596a Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package model content data objects with no knowledges of store

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Permission

type Permission int32

Permission is a bitwise access mask

const (
	// CanRead translations on binded and back languages
	CanRead Permission = 1 << (iota + 1)
	// CanReadAll all translations
	CanReadAll
	// CanEdit translations on binded languages
	CanEdit
	// CanEditAll translations
	CanEditAll
	// CanAppend new messages
	CanAppend
	// CanDelete messages
	CanDelete

	// CanEverything is a total access
	CanEverything = CanRead | CanReadAll | CanEdit | CanEditAll | CanAppend | CanDelete
)

type User

type User struct {
	ID         bson.ObjectId `bson:"_id"`
	Email      string        `bson:"email"`
	Passhash   []byte        `bson:"passhash"`
	ResetToken []byte        `bson:"resetToken"`
	IsAdmin    bool          `bson:"isAdmin"`
	Permission Permission    `bson:"permission"`
	CreatedAt  time.Time     `bson:"createdAt"`
	UpdatedAt  time.Time     `bson:"updatedAt"`
	DeletedAt  *time.Time    `bson:"deletedAt"`
}

User of l10n-center

nolint: aligncheck

Jump to

Keyboard shortcuts

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