Documentation ¶
Index ¶
- 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 MachineService
- type ProjectService
- type RouteService
- type SaveService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 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.