Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DB *pop.Connection
DB is a connection to your database to be used throughout your application.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { ID uuid.UUID `json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` UserID uuid.UUID `json:"user_id" db:"user_id"` Licenses Licenses `json:"licenses" db:"-" has_many:"licenses"` Name string `json:"name" db:"name"` }
Application represents a user defined structure that can be updated. Access to an application is limited by Licenses.
func (Application) String ¶
func (a Application) String() string
String is not required by pop and may be deleted
func (*Application) Validate ¶
func (a *Application) Validate(tx *pop.Connection) (*validate.Errors, error)
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*Application) ValidateUpdate ¶
func (a *Application) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error)
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type Applications ¶
type Applications []Application
Applications is not required by pop and may be deleted
func (Applications) String ¶
func (a Applications) String() string
String is not required by pop and may be deleted
type AuthToken ¶
type AuthToken struct { ID uuid.UUID `json:"id" db:"id"` Nonce int `json:"nonce" db:"nonce"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
AuthToken stores the jti of all currently valid API tokens used in actions/api
func (*AuthToken) Validate ¶
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*AuthToken) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*AuthToken) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type AuthTokens ¶
type AuthTokens []AuthToken
AuthTokens is not required by pop and may be deleted
func (AuthTokens) String ¶
func (a AuthTokens) String() string
String is not required by pop and may be deleted
type License ¶
type License struct { ID uuid.UUID `json:"id" db:"id" form:"-"` CreatedAt time.Time `json:"created_at" db:"created_at" form:"-"` UpdatedAt time.Time `json:"updated_at" db:"updated_at" form:"-"` MachineLimit int `json:"machine_limit" db:"machine_limit"` User User `json:"user" db:"-" belongs_to:"user" form:"-"` UserID uuid.UUID `json:"user_id" db:"user_id" form:"-"` Application Application `json:"application" db:"-" belongs_to:"application" form:"-"` ApplicationID uuid.UUID `json:"application_id" db:"application_id" form:"-"` Machines Machines `json:"machines" db:"-" many_to_many:"machines_licenses" form:"-"` }
License provides access to an application for a limited amount of machines.
func (*License) Validate ¶
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*License) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type Machine ¶ added in v0.2.0
type Machine struct { ID uuid.UUID `json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` User User `json:"user" db:"-" belongs_to:"user" form:"-"` UserID uuid.UUID `json:"user_id" db:"user_id" form:"-"` Licenses Licenses `json:"licenses" db:"-" many_to_many:"machines_licenses" form:"-"` }
Machine represents an installation instance of software.
func (*Machine) Validate ¶ added in v0.2.0
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*Machine) ValidateCreate ¶ added in v0.2.0
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*Machine) ValidateUpdate ¶ added in v0.2.0
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type Machines ¶ added in v0.2.0
type Machines []Machine
Machines is not required by pop and may be deleted
type Token ¶
type Token struct { ID uuid.UUID `json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` User User `json:"user" db:"-" belongs_to:"user"` UserID uuid.UUID `json:"user_id" db:"user_id"` }
Token represents a confirmation token used to confirm/login users.
func (*Token) Validate ¶
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*Token) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
type User ¶
type User struct { ID uuid.UUID `json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` Email string `json:"email" db:"email"` }
User can create and manage applications and licenses.
func (*User) Validate ¶
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*User) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.