extension

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDiffer

func NewDiffer() *differ.Service

NewDiffer creates a differ

func NewMBus

func NewMBus(messageBusses map[string]*mbus.Resource) *xmbus.Service

func NewValidator

func NewValidator() *validator.Service

Types

type Differ

type Differ struct{}

func (*Differ) Diff

func (d *Differ) Diff(ctx context.Context, from, to interface{}, opts ...differ.Option) *differ.ChangeLog

type HttpFn

type HttpFn func() http.Http

type MBus

type MBus struct {
	MessageBuses map[string]*mbus.Resource
}

func (*MBus) Message

func (m *MBus) Message(dest string, data interface{}, opts ...xmbus.Option) *xmbus.Message

func (*MBus) Push

func (m *MBus) Push(ctx context.Context, msg *xmbus.Message) (*xmbus.Confirmation, error)

func (*MBus) Resource

func (m *MBus) Resource(dest string) (*mbus.Resource, error)

type Manager

type Manager struct {
	sqlx.Service //remove that embedding once all the interface functions are implemented
	// contains filtered or unexported fields
}

func (*Manager) Validator

func (m *Manager) Validator() *validator.Service

type Option

type Option func(s *Session)

Option represen session option

func WithHttp

func WithHttp(aHttp HttpFn) Option

func WithMessageBus added in v0.8.10

func WithMessageBus(messageBusses []*mbus.Resource) Option

func WithRedirect

func WithRedirect(fn RedirectFn) Option

func WithSql

func WithSql(sql SqlServiceFn) Option

func WithStater

func WithStater(stater state.Stater) Option

func WithTemplateFlush

func WithTemplateFlush(fn TemplateFlushFn) Option

type RedirectFn

type RedirectFn func(ctx context.Context, route *http.Route, options ...state.Option) (handler.Session, error)

type RouterFn

type RouterFn func(ctx context.Context, route *http.Route) (handler.Session, error)

type Session

type Session struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewSession

func NewSession(opts ...Option) *Session

func (*Session) Db

func (s *Session) Db(opts ...sqlx.Option) (*sqlx.Service, error)

func (*Session) Differ

func (s *Session) Differ() *differ.Service

func (*Session) FlushTemplate

func (s *Session) FlushTemplate(ctx context.Context) error

func (*Session) Http

func (s *Session) Http() http.Http

func (*Session) MessageBus

func (s *Session) MessageBus() *xmbus.Service

func (*Session) Session added in v0.9.14

func (s *Session) Session(ctx context.Context, route *http.Route, opts ...state.Option) (handler.Session, error)

func (*Session) Stater

func (s *Session) Stater() *state.Service

func (*Session) Validator

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

type SqlServiceFn

type SqlServiceFn func(options *sqlx.Options) (sqlx.Sqlx, error)

type SqlxValidator

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

func (*SqlxValidator) Validate

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

type TemplateFlushFn

type TemplateFlushFn func(ctx context.Context) error

type Validator

type Validator struct{}

func (*Validator) Validate

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

Jump to

Keyboard shortcuts

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