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 FilesController ¶ added in v0.3.0
type FilesController interface {
// UploadFile uploads a file to the repository.
UploadFile(ctx context.Context, site models.Site, cwd, file string) error
}
FilesController is an interface for the files controller.
type FilesRepository ¶ added in v0.3.0
type FilesRepository interface {
// UploadFile uploads a file to the repository.
UploadFile(ctx context.Context, site models.Site, cwd, file string) error
}
FilesRepository is an interface for the files repository.
type ReadWriteTx ¶ added in v0.3.2
type ReadWriteTx interface{}
ReadWriteTx is a read-write transaction interface.
type SitesController ¶
type SitesController interface {
// Create is a method that creates a new site.
Create(ctx context.Context, site *models.Site) error
// GetSite is a method that gets a site by name.
GetSite(ctx context.Context, name string) (models.Site, error)
}
SitesController contains the methods for sites operations.
type SitesRepository ¶
type SitesRepository interface {
// Create is a method that creates a new site.
Create(ctx context.Context, site *models.Site) error
// GetSite is a method that gets a site by name.
GetSite(ctx context.Context, name string) (models.Site, error)
}
SitesRepository contains the methods for sites operations.