feature

package
v0.0.0-...-ca2f4e6 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilesPrimaryPort

type FilesPrimaryPort interface {
	Get(key string) (string, error)
}

FilesPrimaryPort is the entrypoint for the files

func NewFilesService

func NewFilesService(repo ObjectSecondaryPort) FilesPrimaryPort

NewFilesService instantiates the file service with a ObjectSecondaryPort adapter

type Folder

type Folder struct {
	Children []string `json:"children"`
}

Folder represents a single folder with a list its children names

type FolderPrimaryPort

type FolderPrimaryPort interface {
	GetAll() (Object, error)
}

FolderPrimaryPort is the entrypoint for the folders

func NewFolderService

func NewFolderService(repo ObjectSecondaryPort) FolderPrimaryPort

NewFolderService instantiates the file service with a ObjectSecondaryPort adapter

type Object

type Object struct {
	Key      string             `json:"key"`
	Name     string             `json:"name"`
	Type     string             `json:"type"`
	Children map[string]*Object `json:"children"`
}

Object represents either a Folder or a File, and it can recursively contain its own child Objects

type ObjectSecondaryPort

type ObjectSecondaryPort interface {
	ListAllObjects() (Object, error)
	GetObjectTemporaryURL(key string) (string, error)
}

ObjectSecondaryPort provides the list of functions that must be implemented by the object repository

Jump to

Keyboard shortcuts

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