repositories

package
v0.0.0-...-b39efbf Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hosts

type Hosts interface {
	AddHost(context.Context, *model.Host) (uuid.UUID, error)
	ListHosts(context.Context) ([]model.Host, error)
	HostByID(context.Context, uuid.UUID) (model.Host, error)
	HostByAddress(context.Context, string) (*model.Host, error)
	HostByName(context.Context, string) (*model.Host, error)
	UpdateHost(context.Context, *model.Host) error
}

func NewHostsRepository

func NewHostsRepository(db *pg.DB) Hosts

NewHostsRepository create a new host repository

type VMs

type VMs interface {
	AddVM(context.Context, model.VM) (uuid.UUID, error)
	ListVMs(context.Context) ([]model.VM, error)
	VMByID(context.Context, uuid.UUID) (model.VM, error)
	UpdateVM(context.Context, model.VM) error
}

func NewVMsRepository

func NewVMsRepository(db *pg.DB) VMs

NewVMsRepository create a new vm repository

type Volumes

type Volumes interface {
	AddVolume(context.Context, model.Volume) (uuid.UUID, error)
	ListVolumes(context.Context) ([]model.Volume, error)
	VolumeByID(context.Context, uuid.UUID) (model.Volume, error)
}

func NewVolumesRepository

func NewVolumesRepository(db *pg.DB) Volumes

NewVolumesRepository create a new vm repository

Jump to

Keyboard shortcuts

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