ports

package
v0.1.55 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore added in v0.1.24

type Datastore interface {
	// ReadTx starts a read only transaction.
	ReadTx(context.Context, func(context.Context, ReadTx) error) error
	// ReadWriteTx starts a read write transaction.
	ReadWriteTx(context.Context, func(context.Context, ReadWriteTx) error) error

	io.Closer
	Migration
}

Datastore provides methods for transactional operations.

type Handlers

type Handlers interface {
	// Login ...
	Login() fiber.Handler
	// Dashboard ...
	Dashboard() fiber.Handler
	// Me ...
	Me() fiber.Handler
	// ListOperators ...
	ListOperators() fiber.Handler
	// NewOperator ...
	NewOperator() fiber.Handler
	// CreateOperator ...
	CreateOperator() fiber.Handler
	// ShowOperator ...
	ShowOperator() fiber.Handler
	// TokenOperator ...
	TokenOperator() fiber.Handler
	// DeleteOperator ...
	DeleteOperator() fiber.Handler
	// ListAccounts ...
	ListAccounts() fiber.Handler
	// NewAccount ...
	NewAccount() fiber.Handler
	// CreateAccount ...
	CreateAccount() fiber.Handler
	// ShowAccount ...
	ShowAccount() fiber.Handler
	// DeleteAccount ...
	DeleteAccount() fiber.Handler
	// ListUsers ...
	ListUsers() fiber.Handler
	// NewOperatorSkg ...
	NewOperatorSkg() fiber.Handler
	// CreateOperatorSkg ...
	CreateOperatorSkg() fiber.Handler
	// OperatorSkgsOptions ...
	OperatorSkgsOptions() fiber.Handler
	// AccountSksOptions ...
	AccountSksOptions() fiber.Handler
	// NewUser ...
	NewUser() fiber.Handler
	// ShowUser ...
	ShowUser() fiber.Handler
	// UserCredentials ...
	UserCredentials() fiber.Handler
	// DeleteUser ...
	DeleteUser() fiber.Handler
	// GetAccountToken ...
	GetAccountToken() fiber.Handler
	// ListSystems ...
	ListSystems() fiber.Handler
	// NewSystem ...
	NewSystem() fiber.Handler
	// CreateSystem ...
	CreateSystem() fiber.Handler
	// DeleteSystem ...
	DeleteSystem() fiber.Handler
	// ShowSystem ...
	ShowSystem() fiber.Handler
	// ListTeams ...
	ListTeams() fiber.Handler
	// NewTeam ...
	NewTeam() fiber.Handler
	// CreateTeam ...
	CreateTeam() fiber.Handler
	// ShowTeam ...
	ShowTeam() fiber.Handler
	// DeleteTeam ...
	DeleteTeam() fiber.Handler
	// AccountTeamSearch ...
	AccountTeamSearch() fiber.Handler
	// OperatorSearch ...
	OperatorSearch() fiber.Handler
	// EditTeam ...
	EditTeam() fiber.Handler
	// UpdateTeam ...
	UpdateTeam() fiber.Handler
	// GetTotalNumberOfAccounts ...
	GetTotalNumberOfAccounts() fiber.Handler
	// GetTotalNumberOfOperators ...
	GetTotalNumberOfOperators() fiber.Handler
	// GetTotalNumberOfSystems ...
	GetTotalNumberOfSystems() fiber.Handler
	// GetTotalNumberOfTeams ...
	GetTotalNumberOfTeams() fiber.Handler
	// GetTotalNumberOfUsers ...
	GetTotalNumberOfUsers() fiber.Handler
}

Handlers ...

type Migration added in v0.1.24

type Migration interface {
	// Migrate is a method that runs the migration.
	Migrate(context.Context) error
}

Migration is a method that runs the migration.

type ReadTx added in v0.1.24

type ReadTx interface {
	// GetOperator is a method that returns an operator by ID
	GetOperator(ctx context.Context, operator *models.Operator) error
	// ListOperators is a method that returns a list of operators
	ListOperators(ctx context.Context, results *tables.Results[models.Operator]) error
	// GetAccount ...
	GetAccount(ctx context.Context, account *models.Account) error
	// ListAccounts ...
	ListAccounts(ctx context.Context, results *tables.Results[models.Account]) error
	// GetUser is a method that returns a user by ID
	GetUser(ctx context.Context, user *models.User) error
	// ListUsers is a method that returns a list of users
	ListUsers(ctx context.Context, results *tables.Results[models.User]) error
	// GetProfile is a method that returns the profile of the current user
	GetProfile(ctx context.Context, user *adapters.GothUser) error
	// GetSystem is a method that returns a system by ID
	GetSystem(ctx context.Context, system *models.System) error
	// ListSystems is a method that returns a list of systems
	ListSystems(ctx context.Context, results *tables.Results[models.System]) error
	// GetTeam is a method to get a team.
	GetTeam(ctx context.Context, team *models.Team) error
	// ListTeams is a method that returns a list of teams
	ListTeams(ctx context.Context, results *tables.Results[models.Team]) error
	// GetNKey is a method that returns an NKey by ID
	GetNKey(ctx context.Context, nkey *models.NKey) error
	// GetTotalNumberOfAccounts is a method that returns the total number of accounts
	GetTotalNumberOfAccounts(ctx context.Context, total *int64) error
	// GetTotalNumberOfOperators is a method that returns the total number of operators
	GetTotalNumberOfOperators(ctx context.Context, total *int64) error
	// GetTotalNumberOfSystems is a method that returns the total number of systems
	GetTotalNumberOfSystems(ctx context.Context, total *int64) error
	// GetTotalNumberOfTeams is a method that returns the total number of teams
	GetTotalNumberOfTeams(ctx context.Context, total *int64) error
	// GetTotalNumberOfUsers is a method that returns the total number of users
	GetTotalNumberOfUsers(ctx context.Context, total *int64) error
}

ReadTx provides methods for transactional read operations.

type ReadWriteTx added in v0.1.24

type ReadWriteTx interface {
	// CreateOperator is a method that creates a new operator
	CreateOperator(ctx context.Context, operator *models.Operator) error
	// UpdateOperator is a method that updates an operator
	UpdateOperator(ctx context.Context, operator *models.Operator) error
	// DeleteOperator is a method that deletes an operator
	DeleteOperator(ctx context.Context, operator *models.Operator) error
	// CreateAccount is creating a new account.
	CreateAccount(ctx context.Context, account *models.Account) error
	// UpdateAccount ...
	UpdateAccount(ctx context.Context, account *models.Account) error
	// DeleteAccount ...
	DeleteAccount(ctx context.Context, account *models.Account) error
	// CreateUser is a method that creates a user
	CreateUser(ctx context.Context, user *models.User) error
	// UpdateUser is a method that updates a user
	UpdateUser(ctx context.Context, user *models.User) error
	// DeleteUser is a method that deletes a user
	DeleteUser(ctx context.Context, user *models.User) error
	// CreateSystem is a method that creates a new system
	CreateSystem(ctx context.Context, system *models.System) error
	// UpdateSystem is a method that updates a system
	UpdateSystem(ctx context.Context, system *models.System) error
	// DeleteSystem is a method that deletes a system
	DeleteSystem(ctx context.Context, system *models.System) error
	// CreateTeam is a method to create a team.
	CreateTeam(ctx context.Context, team *models.Team) error
	// UpdateTeam is a method to update a team.
	UpdateTeam(ctx context.Context, team *models.Team) error
	// DeleteTeam is a method to delete a team.
	DeleteTeam(ctx context.Context, team *models.Team) error

	ReadTx
}

ReadWriteTx provides methods for transactional read and write operations.

Jump to

Keyboard shortcuts

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