service

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(params Params) (domain.Service, error)

Types

type Params

type Params struct {
	fx.In
	Repo          domain.Repository
	KeyConfig     config.KeyConfig
	AccountConfig config.AccountConfig
	K8SAdapter    domain.K8SAdapter
	DMAdapter     domain.DecisionMakerAdapter
}

type Service

type Service struct {
	K8SAdapter domain.K8SAdapter
	DMAdapter  domain.DecisionMakerAdapter
	Repo       domain.Repository
	// contains filtered or unexported fields
}

func (*Service) ChangePassword

func (svc *Service) ChangePassword(ctx context.Context, userClaims *domain.Claims, oldPassword, newPassword string) error

func (*Service) CheckDMIntents added in v1.2.0

func (svc *Service) CheckDMIntents(ctx context.Context) error

func (*Service) CreateAdminUserIfNotExists

func (svc *Service) CreateAdminUserIfNotExists(ctx context.Context, username, password string) error

func (*Service) CreateNewUser

func (svc *Service) CreateNewUser(ctx context.Context, operator *domain.Claims, username, password string) error

func (*Service) CreateRole

func (svc *Service) CreateRole(ctx context.Context, operator *domain.Claims, role *domain.Role) error

func (*Service) CreateScheduleStrategy

func (svc *Service) CreateScheduleStrategy(ctx context.Context, operator *domain.Claims, strategy *domain.ScheduleStrategy) error

func (*Service) CreateUser

func (svc *Service) CreateUser(ctx context.Context, operator domain.Claims, user *domain.User) error

func (*Service) DeleteRole

func (svc *Service) DeleteRole(ctx context.Context, operator *domain.Claims, roleID string) error

func (*Service) DeleteScheduleIntents added in v1.1.0

func (svc *Service) DeleteScheduleIntents(ctx context.Context, operator *domain.Claims, intentIDs []string) error

func (*Service) DeleteScheduleStrategy added in v1.1.0

func (svc *Service) DeleteScheduleStrategy(ctx context.Context, operator *domain.Claims, strategyID string) error

func (*Service) DeleteUser

func (svc *Service) DeleteUser(ctx context.Context, operator domain.Claims, userID bson.ObjectID) error

func (*Service) GetPodPIDMapping added in v1.2.0

func (svc *Service) GetPodPIDMapping(ctx context.Context, nodeID string) (*domain.PodPIDMappingResponse, error)

func (Service) ListAuditLogs

func (svc Service) ListAuditLogs(ctx context.Context, opt *domain.QueryAuditLogOptions) error

func (*Service) ListNodes added in v1.2.0

func (svc *Service) ListNodes(ctx context.Context) ([]*domain.Node, error)

ListNodes returns all nodes in the Kubernetes cluster

func (*Service) ListScheduleIntents

func (svc *Service) ListScheduleIntents(ctx context.Context, filterOpts *domain.QueryIntentOptions) error

func (*Service) ListScheduleStrategies

func (svc *Service) ListScheduleStrategies(ctx context.Context, filterOpts *domain.QueryStrategyOptions) error

func (*Service) Login

func (svc *Service) Login(ctx context.Context, username, password string) (string, error)

func (Service) QueryPermissions

func (svc Service) QueryPermissions(ctx context.Context, opt *domain.QueryPermissionOptions) error

func (*Service) QueryRoles

func (svc *Service) QueryRoles(ctx context.Context, opt *domain.QueryRoleOptions) error

func (*Service) QueryUsers

func (svc *Service) QueryUsers(ctx context.Context, opt *domain.QueryUserOptions) error

func (*Service) ResetPassword

func (svc *Service) ResetPassword(ctx context.Context, operator *domain.Claims, id, newPassword string) error

func (*Service) UpdateRole

func (svc *Service) UpdateRole(ctx context.Context, operator *domain.Claims, roleID string, opt domain.UpdateRoleOptions) error

func (*Service) UpdateUser

func (svc *Service) UpdateUser(ctx context.Context, operator domain.Claims, user *domain.User) error

func (*Service) UpdateUserPermissions

func (svc *Service) UpdateUserPermissions(ctx context.Context, operator *domain.Claims, id string, opt domain.UpdateUserPermissionsOptions) error

func (*Service) VerifyJWTToken

func (svc *Service) VerifyJWTToken(ctx context.Context, tokenString string, permissionKey domain.PermissionKey) (domain.Claims, domain.RolePolicy, error)

Jump to

Keyboard shortcuts

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