Documentation ¶
Index ¶
- Variables
- type CommonService
- func (s *CommonService[T]) All() ([]*T, error)
- func (s *CommonService[T]) ByID(id *string) (*T, error)
- func (s *CommonService[T]) ByIDWithLoader(id *string) (*T, error)
- func (s *CommonService[T]) ByIDs(ids []*string) ([]*T, error)
- func (s *CommonService[T]) ByIDsWithLoader(ids []*string) ([]*T, error)
- type HeadscaleService
- func (service *HeadscaleService) CreateUser(name string) (*model.HUser, error)
- func (service *HeadscaleService) DeleteMachine(machineId uint64) error
- func (service *HeadscaleService) DeleteUser(name string) (bool, error)
- func (svc *HeadscaleService) GenerateACL() (*policy.ACLPolicy, error)
- func (service *HeadscaleService) GetMachine(machineId uint64) (*model.HMachine, error)
- func (service *HeadscaleService) ListMachines() ([]*model.HMachine, error)
- func (service *HeadscaleService) RenameMachine(machineId uint64, name string) (*model.HMachine, error)
- func (service *HeadscaleService) RenameUser(oldName string, newName string) (*model.HUser, error)
- func (service *HeadscaleService) SetMachineTags(machineId uint64, tags []string) (*model.HMachine, error)
- func (svc *HeadscaleService) TriggerUpdate() error
- type MachineService
- type ProjectService
- type RouteService
- type SaveService
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAccessible = errors.New("not Accessible")
Functions ¶
This section is empty.
Types ¶
type CommonService ¶
type CommonService[T serviceable] struct {
// contains filtered or unexported fields
}
func NewCommonService ¶
func NewCommonService[T serviceable](ctx context.Context, tableName string) *CommonService[T]
func (*CommonService[T]) All ¶
func (s *CommonService[T]) All() ([]*T, error)
func (*CommonService[T]) ByID ¶
func (s *CommonService[T]) ByID(id *string) (*T, error)
func (*CommonService[T]) ByIDWithLoader ¶
func (s *CommonService[T]) ByIDWithLoader(id *string) (*T, error)
func (*CommonService[T]) ByIDs ¶
func (s *CommonService[T]) ByIDs(ids []*string) ([]*T, error)
func (*CommonService[T]) ByIDsWithLoader ¶
func (s *CommonService[T]) ByIDsWithLoader(ids []*string) ([]*T, error)
type HeadscaleService ¶ added in v1.3.0
type HeadscaleService struct {
// contains filtered or unexported fields
}
func NewHeadscaleService ¶ added in v1.3.0
func NewHeadscaleService(ctx context.Context) *HeadscaleService
func (*HeadscaleService) CreateUser ¶ added in v1.3.1
func (service *HeadscaleService) CreateUser(name string) (*model.HUser, error)
func (*HeadscaleService) DeleteMachine ¶ added in v1.3.0
func (service *HeadscaleService) DeleteMachine(machineId uint64) error
func (*HeadscaleService) DeleteUser ¶ added in v1.3.1
func (service *HeadscaleService) DeleteUser(name string) (bool, error)
func (*HeadscaleService) GenerateACL ¶ added in v1.3.1
func (svc *HeadscaleService) GenerateACL() (*policy.ACLPolicy, error)
func (*HeadscaleService) GetMachine ¶ added in v1.3.0
func (service *HeadscaleService) GetMachine(machineId uint64) (*model.HMachine, error)
func (*HeadscaleService) ListMachines ¶ added in v1.3.0
func (service *HeadscaleService) ListMachines() ([]*model.HMachine, error)
func (*HeadscaleService) RenameMachine ¶ added in v1.3.0
func (*HeadscaleService) RenameUser ¶ added in v1.3.1
func (*HeadscaleService) SetMachineTags ¶ added in v1.3.3
func (*HeadscaleService) TriggerUpdate ¶ added in v1.3.1
func (svc *HeadscaleService) TriggerUpdate() error
type MachineService ¶
type MachineService struct { CommonService[model.Machine] SaveService[*model.MachineInput] }
func NewMachineService ¶
func NewMachineService(ctx context.Context) *MachineService
type ProjectService ¶
type ProjectService struct { CommonService[model.Project] SaveService[*model.ProjectInput] }
func NewProjectService ¶
func NewProjectService(ctx context.Context) *ProjectService
func (*ProjectService) SyncProjectRoute ¶
func (svc *ProjectService) SyncProjectRoute(projectID *string) ([]*model.SyncResult, error)
type RouteService ¶
type RouteService struct { CommonService[model.Route] SaveService[*model.RouteInput] }
func NewRouteService ¶
func NewRouteService(ctx context.Context) *RouteService
func (*RouteService) ProjectRoutes ¶
func (svc *RouteService) ProjectRoutes(projectId *string) ([]*model.Route, error)
type SaveService ¶
func NewSaveService ¶
func (*SaveService[T]) Save ¶
func (s *SaveService[T]) Save(t T) (string, error)
Click to show internal directories.
Click to hide internal directories.