controllers

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 3 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 struct {
	// contains filtered or unexported fields
}

AccountController is a controller for managing accounts.

func NewAccountController

func NewAccountController(account ports.AccountRepository) *AccountController

NewAccountController creates a new AccountController.

func (*AccountController) Create

func (c *AccountController) Create(ctx context.Context, account *models.Account) error

Create is a method that creates a new account.

func (*AccountController) Delete

func (c *AccountController) Delete(ctx context.Context, account *models.Account) error

Delete is a method that deletes an account.

func (*AccountController) Get

func (c *AccountController) Get(ctx context.Context, account *models.Account) error

Get is a method that returns an account by ID.

func (*AccountController) GetCurrent

func (c *AccountController) GetCurrent(ctx context.Context, account *models.Account) error

GetCurrent is a method that returns the current account.

func (*AccountController) List

func (c *AccountController) List(ctx context.Context, accounts *[]models.Account) error

List is a method that returns a list of accounts.

func (*AccountController) Update

func (c *AccountController) Update(ctx context.Context, account *models.Account) error

Update is a method that updates an existing account.

type DeviceAuthController

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

func NewDeviceAuthController

func NewDeviceAuthController(deviceAuthRepo ports.DeviceAuthRepository, accountRepo ports.AccountRepository) *DeviceAuthController

func (*DeviceAuthController) Begin

Begin is a method that begins the device authentication process.

func (*DeviceAuthController) Finish

func (c *DeviceAuthController) Finish(ctx context.Context, deviceAuth *models.DeviceAuth) (*models.Account, error)

Finish is a method that finishes the device authentication process.

type FilesController added in v0.3.0

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

func NewFilesController added in v0.3.0

func NewFilesController(repo ports.FilesRepository) *FilesController

func (*FilesController) UploadFile added in v0.3.0

func (c *FilesController) UploadFile(ctx context.Context, site models.Site, cwd, file string) error

UploadFile is a method that uploads a file to the repository.

type SitesController

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

func NewSitesController

func NewSitesController(sitesRepo ports.SitesRepository) *SitesController

func (*SitesController) Create

func (c *SitesController) Create(ctx context.Context, site *models.Site) error

Create is a method that creates a new site.

func (*SitesController) GetSite added in v0.3.0

func (c *SitesController) GetSite(ctx context.Context, name string) (models.Site, error)

GetSite is a method that gets a site by name.

Jump to

Keyboard shortcuts

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