app

package
v0.0.0-...-f5b340a Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ListError when app cannot be listed
	ListError errors.TraceableType = "AppListError"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID       t.String
	TenantID t.String
}

type AppCursorList

type AppCursorList struct {
	LastKey t.String
	Results []*App
}

type Repository

type Repository interface {
	Create(c context.Context, id string, data *App) error
	Get(c context.Context, id string) (*App, error)
	Update(c context.Context, id string, data *App) error
	Delete(c context.Context, id string) error
	FindAll(c context.Context, startAt string, limit int64) (*AppCursorList, error)
	FindByTenant(c context.Context, tenantID string, startAt string, limit int64) (*AppCursorList, error)
}

Repository is the interface to store the data (it will need to be implemented)

type Service

type Service interface {
	//Create(c context.Context, data *App) (string, error)
	//Get(c context.Context, appID string) (*App, error)
	//Update(c context.Context, appID string, data *App) error
	//Delete(c context.Context, appID string) error
	List(c context.Context, startAt string, limit int64) (*AppCursorList, error)
	GetAppsForTenant(c context.Context, tenantID string, startAt string, limit int64) (*AppCursorList, error)
}

Service for the app module

func New

func New(apps Repository) Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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