handler

package
v0.20.8 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 35 Imported by: 0 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 NewAuth added in v0.11.0

func NewAuth(authService *auth.Service) hauth.Auth

Types

type Auth added in v0.11.0

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

func (*Auth) Authenticator added in v0.11.0

func (a *Auth) Authenticator(vendor hauth.Vendor) (hauth.Authenticator, error)

func (*Auth) Signer added in v0.11.0

func (a *Auth) Signer() *signer.Service

func (*Auth) Verifier added in v0.11.0

func (a *Auth) Verifier() *verifier.Service

type DBProvider

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

func (*DBProvider) Db

func (d *DBProvider) Db() (*sql.DB, error)

type DbSource added in v0.15.9

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

func (*DbSource) Db added in v0.15.9

func (d *DbSource) Db(_ context.Context) (*sql.DB, error)

func (*DbSource) Dialect added in v0.15.9

func (d *DbSource) Dialect(ctx context.Context) (*info.Dialect, error)

type Executor

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

func NewExecutor

func NewExecutor(aView *view.View, aSession *session.Session, opts ...Option) *Executor

func (Executor) Clone

func (o Executor) Clone(opts []Option) *options

func (*Executor) Execute

func (e *Executor) Execute(ctx context.Context) error

func (*Executor) ExpandAndExecute

func (e *Executor) ExpandAndExecute(ctx context.Context) (*executor.Session, error)

func (*Executor) HandlerSession

func (e *Executor) HandlerSession(ctx context.Context, opts ...Option) (*extension.Session, error)

func (*Executor) NewHandlerSession

func (e *Executor) NewHandlerSession(ctx context.Context, opts ...Option) (handler.Session, error)

func (Executor) Options

func (o Executor) Options(opts []Option) []Option

func (*Executor) Session

func (e *Executor) Session(ctx context.Context) (*executor.Session, error)

type Httper added in v0.9.12

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

func NewHttp added in v0.9.12

func NewHttp(executor *Executor, resource *view.Resource) *Httper

func (*Httper) FailWithCode added in v0.9.12

func (h *Httper) FailWithCode(statusCode int, err error) error

func (*Httper) NewRequest added in v0.9.12

func (h *Httper) NewRequest(ctx context.Context, opts ...hstate.Option) (*http.Request, error)

func (*Httper) Redirect added in v0.9.12

func (h *Httper) Redirect(ctx context.Context, route *dhttp.Route, request *http.Request) error

func (*Httper) RequestOf added in v0.9.12

func (h *Httper) RequestOf(ctx context.Context, any interface{}) (*http.Request, error)

type Option

type Option func(o *options)

func WithAuth added in v0.11.0

func WithAuth(auth *auth.Service) Option

func WithEmbedFS

func WithEmbedFS(fs *embed.FS) Option

func WithTypes

func WithTypes(types ...*state.Type) Option

type Service

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

func (*Service) Allocate

func (s *Service) Allocate(ctx context.Context, tableName string, dest interface{}, selector string) error

func (*Service) CanBatch

func (s *Service) CanBatch(table string) bool

func (*Service) CanBatchGlobally

func (s *Service) CanBatchGlobally() bool

func (*Service) Db

func (s *Service) Db(ctx context.Context) (*sql.DB, error)

func (*Service) Delete

func (s *Service) Delete(tableName string, data interface{}) error

func (*Service) Dialect

func (s *Service) Dialect(ctx context.Context) (*info.Dialect, error)

func (*Service) Execute

func (s *Service) Execute(DML string, options ...sqlx.ExecutorOption) error

func (*Service) Flush

func (s *Service) Flush(ctx context.Context, tableName string) error

func (*Service) Insert

func (s *Service) Insert(tableName string, data interface{}) error

func (*Service) Load

func (s *Service) Load(ctx context.Context, tableName string, data interface{}) error

func (*Service) Read

func (s *Service) Read(ctx context.Context, dest interface{}, SQL string, params ...interface{}) error

func (*Service) Tx

func (s *Service) Tx(ctx context.Context) (*sql.Tx, error)

func (*Service) Update

func (s *Service) Update(tableName string, data interface{}) error

func (*Service) Validator

func (s *Service) Validator() *validator.Service

type Validator

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

func (*Validator) Validate

func (v *Validator) Validate(ctx context.Context, any interface{}, options ...validator.Option) (*validator.Validation, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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