controllers

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: 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 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) Delete

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

Delete is a method that deletes a site.

func (*SitesController) Exists

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

Exists is a method that returns true if a site exists.

func (*SitesController) Get

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

Get is a method that returns a site by ID.

func (*SitesController) UploadFile

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

UploadFile is a method that uploads a file to a site.

Jump to

Keyboard shortcuts

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