app

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Code generated by options-gen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type OptOptionsSetter

type OptOptionsSetter func(o *Options)

type Options

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

func NewOptions

func NewOptions(
	logger *slog.Logger,
	targets []config.Target,
	users config.UsersConfig,
	acls *rules.ACLs,
	storage *storage.Service,
	options ...OptOptionsSetter,
) Options

func (*Options) Validate

func (o *Options) Validate() error

type QueryResults added in v0.13.0

type QueryResults struct {
	CreatedAt time.Time
	Query     string
	QTable    structs.QTable
}

type Service

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

func New

func New(opts Options) (*Service, error)

func (*Service) AuthType added in v0.9.0

func (s *Service) AuthType() config.AuthType

func (*Service) AuthUser

func (s *Service) AuthUser(_ context.Context, username, password string) (*structs.User, error)

func (*Service) CompleteOIDC added in v0.9.0

func (s *Service) CompleteOIDC(ctx context.Context, code string) (*structs.User, time.Time, error)

func (*Service) GetQueryResults added in v0.13.0

func (s *Service) GetQueryResults(ctx context.Context, uid config.UserID, qid uuid6.UUID) (*QueryResults, error)

func (*Service) GetTargetByID

func (s *Service) GetTargetByID(ctx context.Context, uID config.UserID, tID config.TargetID) (*structs.Server, error)

func (*Service) GetTargets

func (s *Service) GetTargets(_ context.Context, uID config.UserID) ([]structs.Server, error)

GetTargets return targets that available for this user id.

func (*Service) InitOIDC added in v0.9.0

func (s *Service) InitOIDC(_ context.Context) (string, error)

func (*Service) RunQuery

func (s *Service) RunQuery(ctx context.Context, userID config.UserID, srvID config.TargetID, query string) (uuid6.UUID, *structs.QTable, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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