boltPackages

package
Version: v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: BSD-3-Clause Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChangelogPool

func NewChangelogPool(directory string, fileMode os.FileMode, boltOptions *bolt.Options) (*timed.Pool, error)

func NewDB

func NewDB(filename string, fileMode os.FileMode, boltOptions *bolt.Options) (db *bolt.DB, err error)

NewDB opens a new BoltDB database.

Types

type Logger added in v0.4.1

type Logger interface {
	Errorf(format string, a ...interface{})
}

Logger defines interface for logging messages with various severity levels.

type Service

type Service struct {
	DB        *bolt.DB
	Changelog *timed.Pool
	Logger    Logger
}

Service implements gopherpit.com/gopherpit/services/packages.Service interface.

func (Service) AddDomain

func (s Service) AddDomain(o *packages.DomainOptions, byUserID string) (d *packages.Domain, err error)

func (Service) AddPackage

func (s Service) AddPackage(o *packages.PackageOptions, byUserID string) (p *packages.Package, err error)

func (Service) AddUserToDomain

func (s Service) AddUserToDomain(ref, userID, byUserID string) (err error)

func (Service) ChangelogForDomain

func (s Service) ChangelogForDomain(domainRef, start string, limit int) (page packages.Changelog, err error)

func (Service) ChangelogRecord

func (s Service) ChangelogRecord(domainRef, id string) (record *packages.ChangelogRecord, err error)

func (Service) DataDump added in v0.2.1

func (s Service) DataDump(ifModifiedSince *time.Time) (dump *dataDump.Dump, err error)

DataDump implements dataDump.Interface interface to extract database data in a safe and reliable way.

func (Service) DeleteChangelogRecord

func (s Service) DeleteChangelogRecord(domainRef, id string) (record *packages.ChangelogRecord, err error)

func (Service) DeleteDomain

func (s Service) DeleteDomain(ref, byUserID string) (d *packages.Domain, err error)

func (Service) DeletePackage

func (s Service) DeletePackage(id string, byUserID string) (p *packages.Package, err error)

func (Service) Domain

func (s Service) Domain(ref string) (d *packages.Domain, err error)

func (Service) DomainUsers

func (s Service) DomainUsers(ref string) (users packages.DomainUsers, err error)

func (Service) Domains

func (s Service) Domains(startRef string, limit int) (page packages.DomainsPage, err error)

func (Service) DomainsByOwner

func (s Service) DomainsByOwner(userID, startRef string, limit int) (p packages.DomainsPage, err error)

func (Service) DomainsByUser

func (s Service) DomainsByUser(userID, startRef string, limit int) (p packages.DomainsPage, err error)

func (Service) Package

func (s Service) Package(id string) (p *packages.Package, err error)

func (Service) PackagesByDomain

func (s Service) PackagesByDomain(domainRef, startName string, limit int) (page packages.PackagesPage, err error)

func (Service) RemoveUserFromDomain

func (s Service) RemoveUserFromDomain(ref, userID, byUserID string) (err error)

func (Service) ResolvePackage

func (s Service) ResolvePackage(path string) (resolution *packages.PackageResolution, err error)

func (Service) UpdateDomain

func (s Service) UpdateDomain(ref string, o *packages.DomainOptions, byUserID string) (d *packages.Domain, err error)

func (Service) UpdatePackage

func (s Service) UpdatePackage(id string, o *packages.PackageOptions, byUserID string) (p *packages.Package, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL