settings

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 7 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

Overview

Package settings is the HTTP adapter of the project settings: the users, the access tokens of the project and the nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler serves the settings routes.

func New

func New(svc Service) *Handler

New returns a Handler on the service.

func (*Handler) Register

func (h *Handler) Register(settings gin.IRoutes)

Register adds the routes to the settings group of a project. The group has to resolve the project and decide who may use the settings.

type Service

type Service interface {
	Users(ctx context.Context) ([]models.User, error)
	CreateProjectToken(ctx context.Context, projectID uint, in access.NewToken) (*models.AccessToken, error)
	ProjectTokens(ctx context.Context, projectID uint) ([]models.AccessToken, error)
	DeleteProjectToken(ctx context.Context, projectID, tokenID uint) error
	CreateNode(ctx context.Context, name string) (*access.NodeToken, error)
	Nodes(ctx context.Context) ([]models.Node, error)
	Node(ctx context.Context, id uint) (*models.Node, error)
	IssueNodeToken(ctx context.Context, id uint) (*access.NodeToken, error)
	DeleteNode(ctx context.Context, id uint) error
}

Service is what the handlers need from the access use cases.

Jump to

Keyboard shortcuts

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