clochness

package
v0.0.0-...-8688e54 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateEntryParams

type CreateEntryParams struct {
	UserID      int32
	ProjectID   pgtype.Int4
	Description string
	StartDate   pgtype.Date
	EndDate     pgtype.Date
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Entry

type Entry struct {
	ID          int32
	UserID      int32
	ProjectID   pgtype.Int4
	Description string
	StartDate   pgtype.Date
	EndDate     pgtype.Date
	CreatedAt   pgtype.Timestamp
	UpdatedAt   pgtype.Timestamp
}

type Organization

type Organization struct {
	ID        int32
	Name      string
	CreatedAt pgtype.Timestamp
	UpdatedAt pgtype.Timestamp
}

type Project

type Project struct {
	ID             int32
	Name           string
	Description    pgtype.Text
	OrganizationID int32
	StartDate      pgtype.Date
	EndDate        pgtype.Date
	CreatedAt      pgtype.Timestamp
	UpdatedAt      pgtype.Timestamp
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateEntry

func (q *Queries) CreateEntry(ctx context.Context, arg CreateEntryParams) (Entry, error)

func (*Queries) DeleteEntry

func (q *Queries) DeleteEntry(ctx context.Context, id int32) error

func (*Queries) GetEntry

func (q *Queries) GetEntry(ctx context.Context, id int32) (Entry, error)

func (*Queries) ListEntries

func (q *Queries) ListEntries(ctx context.Context) ([]Entry, error)

func (*Queries) UpdateEntry

func (q *Queries) UpdateEntry(ctx context.Context, arg UpdateEntryParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type UpdateEntryParams

type UpdateEntryParams struct {
	ID          int32
	UserID      int32
	ProjectID   pgtype.Int4
	Description string
	StartDate   pgtype.Date
	EndDate     pgtype.Date
}

type User

type User struct {
	ID       int32
	Email    string
	Password string
}

type UserOrganization

type UserOrganization struct {
	UserID         int32
	OrganizationID int32
	Role           pgtype.Text
	JoinedAt       pgtype.Timestamp
}

Jump to

Keyboard shortcuts

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