models

package
v0.0.0-...-48f1617 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

DB is a connection to your database to be used throughout your application.

Functions

func ProcessProjects

func ProcessProjects(projects []discovery.Project) error

Types

type License

type License 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"`
	ToolID      uuid.UUID    `json:"tool_id" db:"tool_id"`
	Name        string       `json:"name" db:"name"`
	Body        nulls.String `json:"body" db:"body"`
	Description nulls.String `json:"description" db:"description"`
}

func (License) String

func (l License) String() string

String is not required by pop and may be deleted

func (*License) Validate

func (l *License) 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 (*License) ValidateCreate

func (l *License) ValidateCreate(tx *pop.Connection) (*validate.Errors, error)

ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.

func (*License) ValidateUpdate

func (l *License) 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 Licenses

type Licenses []License

Licenses is not required by pop and may be deleted

func (Licenses) String

func (l Licenses) String() string

String is not required by pop and may be deleted

type Tool

type Tool 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"`
	Name             string        `json:"name" db:"name"`
	NameWithOwner    string        `json:"name_with_owner" db:"name_with_owner"`
	URL              string        `json:"url" db:"url"`
	DiscoveryService string        `json:"discovery" db:"discovery"`
	Stars            int           `json:"stars" db:"stars"`
	Watchers         int           `json:"watchers" db:"watchers"`
	Forks            int           `json:"forks" db:"forks"`
	Description      nulls.String  `json:"description" db:"description"`
	Readme           nulls.String  `json:"readme" db:"readme"`
	Topics           slices.String `json:"topics" db:"topics"`
	License          License       `json:"license" has_one:"license"`
}

func (Tool) String

func (t Tool) String() string

String is not required by pop and may be deleted

func (*Tool) Validate

func (t *Tool) 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 (*Tool) ValidateCreate

func (t *Tool) ValidateCreate(tx *pop.Connection) (*validate.Errors, error)

ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.

func (*Tool) ValidateUpdate

func (t *Tool) 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 Tools

type Tools []Tool

Tools is not required by pop and may be deleted

func (Tools) String

func (t Tools) String() string

String is not required by pop and may be deleted

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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