db

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type GetResourceRow

type GetResourceRow struct {
	Type int64
	Data interface{}
}

type ListAllResourcesRow

type ListAllResourcesRow struct {
	Type int64
	Data interface{}
}

type ListResourcesByIDsRow

type ListResourcesByIDsRow struct {
	Type int64
	Data interface{}
}

type ListTypedResourcesInProjectParams

type ListTypedResourcesInProjectParams struct {
	ProjectID interface{}
	Type      int64
}

type ListTypedResourcesInProjectRow

type ListTypedResourcesInProjectRow struct {
	Type int64
	Data interface{}
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteResource

func (q *Queries) DeleteResource(ctx context.Context, id interface{}) (interface{}, error)

func (*Queries) GetResource

func (q *Queries) GetResource(ctx context.Context, id interface{}) (GetResourceRow, error)

func (*Queries) ListAllResources

func (q *Queries) ListAllResources(ctx context.Context) ([]ListAllResourcesRow, error)

func (*Queries) ListResourcesByIDs

func (q *Queries) ListResourcesByIDs(ctx context.Context, ids []interface{}) ([]ListResourcesByIDsRow, error)

func (*Queries) UpsertResource

func (q *Queries) UpsertResource(ctx context.Context, arg UpsertResourceParams) (UpsertResourceRow, error)

func (*Queries) WithTx

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

type Resource

type Resource struct {
	ID          interface{}
	Name        interface{}
	ProjectID   interface{}
	Description interface{}
	Tags        interface{}
	Type        int64
	Locality    interface{}
	JsonData    interface{}
}

type UpsertResourceParams

type UpsertResourceParams struct {
	ID          interface{}
	Name        interface{}
	ProjectID   interface{}
	Description interface{}
	Tags        interface{}
	Type        int64
	Locality    interface{}
	Data        interface{}
}

type UpsertResourceRow

type UpsertResourceRow struct {
	Type     int64
	JsonData interface{}
}

Jump to

Keyboard shortcuts

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