app

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: GPL-3.0 Imports: 19 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,
	cfg config.Config,
	options ...OptOptionsSetter,
) Options

func (*Options) Validate

func (o *Options) Validate() error

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) GetACLs added in v0.9.0

func (s *Service) GetACLs(_ context.Context, uID config.UserID, tID config.TargetID) []config.ACL

func (*Service) GetTargetByID

func (s *Service) GetTargetByID(_ context.Context, id config.TargetID) (*config.Target, error)

func (*Service) GetTargets

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

func (*Service) GetUserByID added in v0.9.0

func (s *Service) GetUserByID(_ context.Context, id config.UserID) (*config.User, error)

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) (*structs.QTable, error)

Jump to

Keyboard shortcuts

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