exportservices

package
v0.0.0-...-c9f6891 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByObjectName

type ByObjectName []objects.ObjectWithAccess

func (ByObjectName) Len

func (a ByObjectName) Len() int

func (ByObjectName) Less

func (a ByObjectName) Less(i, j int) bool

func (ByObjectName) Swap

func (a ByObjectName) Swap(i, j int)

type EService

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

func (*EService) GetDevice

func (s *EService) GetDevice(ctx context.Context, nick, owner, tokenOwner string) (device *devices.Device, rerr *utils.RError)

func (*EService) GetStepRev

func (s *EService) GetStepRev(ctx context.Context, trailID, rev, frags string) (r string, state []byte, modtime *time.Time, rerr *utils.RError)

func (*EService) GetTrailObjects

func (s *EService) GetTrailObjects(ctx context.Context, deviceID, rev, owner, authType string, isPublic bool, frags string) (owa []objects.ObjectWithAccess, rerr *utils.RError)

func (*EService) GetUserAccountByNick

func (s *EService) GetUserAccountByNick(ctx context.Context, nick string) (accounts.Account, error)

GetUserAccountByNick : Get User Account By Nick

func (*EService) WriteExportTar

func (s *EService) WriteExportTar(
	w rest.ResponseWriter,
	filename string,
	objectDownloads []objects.ObjectWithAccess,
	state []byte,
	modtime *time.Time,
)

type ExportService

type ExportService interface {
	GetUserAccountByNick(ctx context.Context, nick string) (accounts.Account, error)
	GetDevice(ctx context.Context, nick, owner, tokenOwner string) (device *devices.Device, rerr *utils.RError)
	GetTrailObjects(ctx context.Context, deviceID, rev, owner, authType string, isPublic bool, frags string) (owa []objects.ObjectWithAccess, rerr *utils.RError)
	GetStepRev(ctx context.Context, trailID, rev, frags string) (r string, state []byte, modtime *time.Time, rerr *utils.RError)
	WriteExportTar(
		w rest.ResponseWriter,
		filename string,
		objectDownloads []objects.ObjectWithAccess,
		state []byte,
		modetime *time.Time)
}

func CreateService

func CreateService(client *mongo.Client, db string) ExportService

Jump to

Keyboard shortcuts

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