ports

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountController

type AccountController interface {
	// GetCurrent is a method that returns the current account.
	GetCurrent(ctx context.Context, account *models.Account) error
	// Get is a method that returns an account by ID.
	Get(ctx context.Context, account *models.Account) error
	// Create is a method that creates a new account.
	Create(ctx context.Context, account *models.Account) error
	// Delete is a method that deletes an account.
	Delete(ctx context.Context, account *models.Account) error
	// Update is a method that updates an account.
	Update(ctx context.Context, account *models.Account) error
	// List is a method that returns a list of accounts.
	List(ctx context.Context, accounts *[]models.Account) error
}

AccountController is an interface that defines the methods for account operations.

type AccountRepository

type AccountRepository interface {
	// GetCurrent is a method that returns the current account.
	GetCurrent(ctx context.Context, account *models.Account) error
	// Get is a method that returns an account by ID.
	Get(ctx context.Context, account *models.Account) error
	// Create is a method that creates a new account.
	Create(ctx context.Context, account *models.Account) error
	// Delete is a method that deletes an account.
	Delete(ctx context.Context, account *models.Account) error
	// Update is a method that updates an account.
	Update(ctx context.Context, account *models.Account) error
	// List is a method that returns a list of accounts.
	List(ctx context.Context, accounts *[]models.Account) error
}

AccountRepository is an interface that defines the methods for account operations.

type DeviceAuthController

type DeviceAuthController interface {
	// Begin is a method that begins the device authentication process.
	Begin(ctx context.Context) (*models.DeviceAuth, error)
	// Finish is a method that finishes the device authentication process.
	Finish(ctx context.Context, deviceAuth *models.DeviceAuth) (*models.Account, error)
}

DeviceAuthController is an interface that defines the methods for device authentication operations.

type DeviceAuthRepository

type DeviceAuthRepository interface {
	// Begin is a method that begins the device authentication process.
	Begin(ctx context.Context) (*models.DeviceAuth, error)
	// Finish is a method that finishes the device authentication process.
	// TODO: could be returned in a token structure
	Finish(ctx context.Context, deviceAuth *models.DeviceAuth) (*models.Account, error)
}

DeviceAuthRepository is an interface that defines the methods for device authentication operations.

type SitesController

type SitesController interface {
	// Exists is a method that returns true if a site exists.
	Exists(ctx context.Context, site *models.Site) (bool, error)
	// Get is a method that returns a site by ID.
	Get(ctx context.Context, site *models.Site) error
	// Create is a method that creates a new site.
	Create(ctx context.Context, site *models.Site) error
	// Delete is a method that deletes a site.
	Delete(ctx context.Context, site *models.Site) error
	// UploadFile is a method that uploads a file to a site.
	UploadFile(ctx context.Context, site *models.Site, file string) error
}

SitesController contains the methods for sites operations.

type SitesRepository

type SitesRepository interface {
	// Exists is a method that returns true if a site exists.
	Exists(ctx context.Context, site *models.Site) (bool, error)
	// Get is a method that returns a site by ID.
	Get(ctx context.Context, site *models.Site) error
	// Create is a method that creates a new site.
	Create(ctx context.Context, site *models.Site) error
	// Delete is a method that deletes a site.
	Delete(ctx context.Context, site *models.Site) error
	// Deploy is a method that deploys a site.
	UploadFile(ctx context.Context, site *models.Site, file string) error
}

SitesRepository contains the methods for sites operations.

Jump to

Keyboard shortcuts

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