project

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TableName = "projects"

	ErrMissingDB = errors.New("no database path provided for project")
)

Functions

This section is empty.

Types

type Project

type Project struct {
	ID        uint           `json:"id" gorm:"primarykey"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"index"`

	Name     string         `json:"name"`
	Summary  string         `json:"summary"`
	ClientID uint           `json:"client_id"`
	Client   *client.Client `json:"client"`
	// contains filtered or unexported fields
}

func New added in v0.10.0

func New(path string) *Project

func (*Project) BeforeCreate added in v0.10.0

func (p *Project) BeforeCreate(tx *gorm.DB) (err error)

func (*Project) Delete

func (p *Project) Delete(name string) error

func (*Project) FindByName added in v0.10.0

func (p *Project) FindByName(name string, limit int) ([]Project, error)

func (*Project) List added in v0.0.2

func (p *Project) List() ([]Project, error)

func (*Project) Save

func (p *Project) Save() error

func (*Project) SaveJSON added in v0.10.0

func (p *Project) SaveJSON(payload map[string]interface{}) error

func (*Project) Update added in v0.11.0

func (p *Project) Update(payload map[string]interface{}) error

func (*Project) With added in v0.0.2

func (p *Project) With(name string, summary string, client *client.Client) *Project

Jump to

Keyboard shortcuts

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