models

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

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package models contains application specific entities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	ID        int       `json:"id"`
	Name      string    `json:"name"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	Email     string    `json:"email"`
}

Driver holds specific application settings linked to an Account.

func (*Driver) BeforeInsert

func (p *Driver) BeforeInsert(db orm.DB) error

BeforeInsert hook executed before database insert operation.

func (*Driver) BeforeUpdate

func (p *Driver) BeforeUpdate(db orm.DB) error

BeforeUpdate hook executed before database update operation.

type DriverStore

type DriverStore struct {
	// contains filtered or unexported fields
}

DriverStore implements database operations for Driver management.

func NewDriverStore

func NewDriverStore(db *pg.DB) *DriverStore

NewDriverStore returns a DriverStore implementation.

func (*DriverStore) Create

func (s *DriverStore) Create(p *Driver) error

Create Driver.

func (*DriverStore) Get

func (s *DriverStore) Get(driverID int) (*Driver, error)

Get gets an Driver by account ID.

Jump to

Keyboard shortcuts

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