postgres

package
v0.0.0-...-bff9524 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceRepo

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

func NewDeviceRepo

func NewDeviceRepo(client pgclient.Client) (*DeviceRepo, error)

func (*DeviceRepo) CreateDevice

func (d *DeviceRepo) CreateDevice(ctx context.Context, device entity.Device) error

func (*DeviceRepo) CreateNamespace

func (d *DeviceRepo) CreateNamespace(ctx context.Context, namespace entity.Namespace) error

func (*DeviceRepo) CreateSet

func (d *DeviceRepo) CreateSet(ctx context.Context, set entity.Set) error

func (*DeviceRepo) DeleteDevice

func (d *DeviceRepo) DeleteDevice(ctx context.Context, id string) error

func (*DeviceRepo) DeleteNamespace

func (d *DeviceRepo) DeleteNamespace(ctx context.Context, id string) error

func (*DeviceRepo) DeleteSet

func (d *DeviceRepo) DeleteSet(ctx context.Context, id string) error

func (*DeviceRepo) GetDefaultNamespace

func (d *DeviceRepo) GetDefaultNamespace(ctx context.Context) (entity.Namespace, error)

func (*DeviceRepo) GetDevice

func (d *DeviceRepo) GetDevice(ctx context.Context, id string) (entity.Device, error)

func (*DeviceRepo) GetDevices

func (d *DeviceRepo) GetDevices(ctx context.Context) ([]entity.Device, error)

func (*DeviceRepo) GetNamespace

func (d *DeviceRepo) GetNamespace(ctx context.Context, id string) (entity.Namespace, error)

func (*DeviceRepo) GetNamespaces

func (d *DeviceRepo) GetNamespaces(ctx context.Context) ([]entity.Namespace, error)

func (*DeviceRepo) GetSet

func (d *DeviceRepo) GetSet(ctx context.Context, id string) (entity.Set, error)

func (*DeviceRepo) GetSets

func (d *DeviceRepo) GetSets(ctx context.Context) ([]entity.Set, error)

func (*DeviceRepo) UpdateDevice

func (d *DeviceRepo) UpdateDevice(ctx context.Context, device entity.Device) error

func (*DeviceRepo) UpdateNamespace

func (d *DeviceRepo) UpdateNamespace(ctx context.Context, namespace entity.Namespace) error

func (*DeviceRepo) UpdateSet

func (d *DeviceRepo) UpdateSet(ctx context.Context, set entity.Set) error

type ManifestRepository

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

func NewManifestRepository

func NewManifestRepository(client pgclient.Client) (*ManifestRepository, error)

func (*ManifestRepository) CreateRelation

func (m *ManifestRepository) CreateRelation(ctx context.Context, relation entity.Relation) error

func (*ManifestRepository) DeleteManifest

func (m *ManifestRepository) DeleteManifest(ctx context.Context, id string) error

func (*ManifestRepository) DeleteRelation

func (m *ManifestRepository) DeleteRelation(ctx context.Context, relation entity.Relation) error

func (*ManifestRepository) GetManifest

func (m *ManifestRepository) GetManifest(ctx context.Context, id string) (entity.Manifest, error)

func (*ManifestRepository) GetManifests

func (m *ManifestRepository) GetManifests(ctx context.Context, repo entity.Repository, fiterFn func(m entity.Manifest) bool) ([]entity.Manifest, error)

func (*ManifestRepository) InsertManifest

func (m *ManifestRepository) InsertManifest(ctx context.Context, manifest entity.Manifest) error

func (*ManifestRepository) UpdateManifest

func (m *ManifestRepository) UpdateManifest(ctx context.Context, manifest entity.Manifest) error

type Options

type Options interface {
	Sort(query *gorm.DB) *gorm.DB
	Filter(query *gorm.DB) *gorm.DB
}

type Repository

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

func NewRepository

func NewRepository(client pgclient.Client) (*Repository, error)

func (*Repository) GetRepositories

func (m *Repository) GetRepositories(ctx context.Context) ([]entity.Repository, error)

func (*Repository) GetRepository

func (m *Repository) GetRepository(ctx context.Context, id string) (entity.Repository, error)

func (*Repository) InsertRepository

func (m *Repository) InsertRepository(ctx context.Context, r entity.Repository) error

func (*Repository) UpdateRepository

func (m *Repository) UpdateRepository(ctx context.Context, r entity.Repository) error

Jump to

Keyboard shortcuts

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