gwtools

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonPassThrough

func CommonPassThrough(builder *gateway.Builder, params *CommonPassThroughParams, middlewares ...api.Handler)

func DeleteCommonPassThrough

func DeleteCommonPassThrough(builder *gateway.Builder, params *SimpleCommonPassThroughParams, middlewares ...api.Handler)

func DeletePassThrough

func DeletePassThrough(builder *gateway.Builder, params *SimplePassThroughParams, middlewares ...api.Handler)

func EntityCRUD added in v0.5.2

func EntityCRUD(builder *gateway.Builder, params *EntityCRUDParams, opts ...any)

func GetCommonPassThrough

func GetCommonPassThrough(builder *gateway.Builder, params *SimpleCommonPassThroughParams, middlewares ...api.Handler)

func GetPassThrough

func GetPassThrough(builder *gateway.Builder, params *SimplePassThroughParams, middlewares ...api.Handler)

func Many2Many

func Many2Many(builder *gateway.Builder, params *Many2ManyParams, opts ...Many2ManyOption)

func One2Many

func One2Many(builder *gateway.Builder, params *One2ManyParams, opts ...One2ManyOption)

func One2One

func One2One(builder *gateway.Builder, params *One2OneParams, opts ...One2OneOption)

func OneDeletePassThrough

func OneDeletePassThrough(builder *gateway.Builder, params *SimpleOnePassThroughParams, middlewares ...api.Handler)

func OneGetPassThrough

func OneGetPassThrough(builder *gateway.Builder, params *SimpleOnePassThroughParams, middlewares ...api.Handler)

func OnePassThrough

func OnePassThrough(builder *gateway.Builder, params *OnePassThroughParams, middlewares ...api.Handler)

func OnePostPassThrough

func OnePostPassThrough(builder *gateway.Builder, params *SimpleOnePassThroughParams, middlewares ...api.Handler)

func OnePutPassThrough

func OnePutPassThrough(builder *gateway.Builder, params *SimpleOnePassThroughParams, middlewares ...api.Handler)

func PassThrough

func PassThrough(builder *gateway.Builder, params *PassThroughParams, middlewares ...api.Handler)

func PostCommonPassThrough

func PostCommonPassThrough(builder *gateway.Builder, params *SimpleCommonPassThroughParams, middlewares ...api.Handler)

func PostPassThrough

func PostPassThrough(builder *gateway.Builder, params *SimplePassThroughParams, middlewares ...api.Handler)

func PutCommonPassThrough

func PutCommonPassThrough(builder *gateway.Builder, params *SimpleCommonPassThroughParams, middlewares ...api.Handler)

func PutPassThrough

func PutPassThrough(builder *gateway.Builder, params *SimplePassThroughParams, middlewares ...api.Handler)

func ValueObjectCRUD added in v0.5.2

func ValueObjectCRUD(builder *gateway.Builder, params *ValueObjectCRUDParams, opts ...any)

Types

type CommonPassThroughParams

type CommonPassThroughParams struct {
	HttpMethod string
	*SimpleCommonPassThroughParams
}

type EntityCRUDBuilderCallback added in v0.9.4

type EntityCRUDBuilderCallback func(builder *gateway.Builder) *gateway.Builder

type EntityCRUDCreateOption added in v0.5.2

type EntityCRUDCreateOption func(options *EntityCRUDCreateOptions)

func WithEntityCRUDAfterCreateBuilderCallback added in v0.9.4

func WithEntityCRUDAfterCreateBuilderCallback(callbacks EntityCRUDBuilderCallback) EntityCRUDCreateOption

func WithEntityCRUDBeforeCreateBuilderCallback added in v0.9.4

func WithEntityCRUDBeforeCreateBuilderCallback(callbacks EntityCRUDBuilderCallback) EntityCRUDCreateOption

func WithEntityCRUDCreateCallbacks added in v0.5.2

func WithEntityCRUDCreateCallbacks(callbacks gateway.RequestResponseCallback) EntityCRUDCreateOption

func WithEntityCRUDCreateMiddlewares added in v0.5.2

func WithEntityCRUDCreateMiddlewares(middlewares []api.Handler) EntityCRUDCreateOption

type EntityCRUDCreateOptions added in v0.5.2

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

type EntityCRUDDeleteOption added in v0.5.2

type EntityCRUDDeleteOption func(options *EntityCRUDDeleteOptions)

func WithEntityCRUDAfterDeleteBuilderCallback added in v0.9.4

func WithEntityCRUDAfterDeleteBuilderCallback(callbacks EntityCRUDBuilderCallback) EntityCRUDDeleteOption

func WithEntityCRUDBeforeDeleteBuilderCallback added in v0.9.4

func WithEntityCRUDBeforeDeleteBuilderCallback(callbacks EntityCRUDBuilderCallback) EntityCRUDDeleteOption

func WithEntityCRUDDeleteCallbacks added in v0.5.2

func WithEntityCRUDDeleteCallbacks(callbacks gateway.RequestResponseCallback) EntityCRUDDeleteOption

func WithEntityCRUDDeleteMiddlewares added in v0.5.2

func WithEntityCRUDDeleteMiddlewares(middlewares []api.Handler) EntityCRUDDeleteOption

func WithEntityCRUDDisableDelete added in v0.5.2

func WithEntityCRUDDisableDelete() EntityCRUDDeleteOption

type EntityCRUDDeleteOptions added in v0.5.2

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

type EntityCRUDGetByIDOption added in v0.5.2

type EntityCRUDGetByIDOption func(options *EntityCRUDGetByIDOptions)

func WithEntityCRUDAfterGetByIDBuilderCallback added in v0.9.4

func WithEntityCRUDAfterGetByIDBuilderCallback(callbacks EntityCRUDBuilderCallback) EntityCRUDGetByIDOption

func WithEntityCRUDBeforeGetByIDBuilderCallback added in v0.9.4

func WithEntityCRUDBeforeGetByIDBuilderCallback(callbacks EntityCRUDBuilderCallback) EntityCRUDGetByIDOption

func WithEntityCRUDDisableGetByID added in v0.5.2

func WithEntityCRUDDisableGetByID() EntityCRUDGetByIDOption

func WithEntityCRUDGetByIDCallbacks added in v0.5.2

func WithEntityCRUDGetByIDCallbacks(callbacks gateway.RequestResponseCallback) EntityCRUDGetByIDOption

func WithEntityCRUDGetByIDMiddlewares added in v0.5.2

func WithEntityCRUDGetByIDMiddlewares(middlewares []api.Handler) EntityCRUDGetByIDOption

type EntityCRUDGetByIDOptions added in v0.5.2

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

type EntityCRUDGlobalOption added in v0.9.1

type EntityCRUDGlobalOption func(options *EntityCRUDGlobalOptions)

func WithEntityCRUDGlobalMiddlewares added in v0.9.1

func WithEntityCRUDGlobalMiddlewares(middlewares ...api.Handler) EntityCRUDGlobalOption

type EntityCRUDGlobalOptions added in v0.9.1

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

type EntityCRUDParams added in v0.5.2

type EntityCRUDParams struct {
	// 除去后缀的服务URL,如http://localhost:8080/example/api/v1
	ServiceVersionedUrl string

	// 领域名称
	DomainCamelName string
	// contains filtered or unexported fields
}

type EntityCRUDQueryOption added in v0.5.2

type EntityCRUDQueryOption func(options *EntityCRUDQueryOptions)

func WithEntityCRUDAfterQueryBuilderCallback added in v0.9.4

func WithEntityCRUDAfterQueryBuilderCallback(callbacks EntityCRUDBuilderCallback) EntityCRUDQueryOption

func WithEntityCRUDBeforeQueryBuilderCallback added in v0.9.4

func WithEntityCRUDBeforeQueryBuilderCallback(callbacks EntityCRUDBuilderCallback) EntityCRUDQueryOption

func WithEntityCRUDDisableQuery added in v0.5.2

func WithEntityCRUDDisableQuery() EntityCRUDQueryOption

func WithEntityCRUDQueryCallbacks added in v0.5.2

func WithEntityCRUDQueryCallbacks(callbacks gateway.RequestResponseCallback) EntityCRUDQueryOption

func WithEntityCRUDQueryMiddlewares added in v0.5.2

func WithEntityCRUDQueryMiddlewares(middlewares []api.Handler) EntityCRUDQueryOption

type EntityCRUDQueryOptions added in v0.5.2

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

type EntityCRUDUpdateOption added in v0.5.2

type EntityCRUDUpdateOption func(options *EntityCRUDUpdateOptions)

func WithEntityCRUDAfterUpdateBuilderCallback added in v0.9.4

func WithEntityCRUDAfterUpdateBuilderCallback(callbacks EntityCRUDBuilderCallback) EntityCRUDUpdateOption

func WithEntityCRUDBeforeUpdateBuilderCallback added in v0.9.4

func WithEntityCRUDBeforeUpdateBuilderCallback(callbacks EntityCRUDBuilderCallback) EntityCRUDUpdateOption

func WithEntityCRUDDisableUpdate added in v0.5.2

func WithEntityCRUDDisableUpdate() EntityCRUDUpdateOption

func WithEntityCRUDUpdateCallbacks added in v0.5.2

func WithEntityCRUDUpdateCallbacks(callbacks gateway.RequestResponseCallback) EntityCRUDUpdateOption

func WithEntityCRUDUpdateMiddlewares added in v0.5.2

func WithEntityCRUDUpdateMiddlewares(middlewares []api.Handler) EntityCRUDUpdateOption

type EntityCRUDUpdateOptions added in v0.5.2

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

type Many2ManyOption

type Many2ManyOption func(options *Many2ManyOptions)

func WithMany2ManyDisableLeft

func WithMany2ManyDisableLeft() Many2ManyOption

func WithMany2ManyDisableLeftQuery

func WithMany2ManyDisableLeftQuery() Many2ManyOption

func WithMany2ManyDisableLeftUpdate

func WithMany2ManyDisableLeftUpdate() Many2ManyOption

func WithMany2ManyDisableRight

func WithMany2ManyDisableRight() Many2ManyOption

func WithMany2ManyDisableRightQuery

func WithMany2ManyDisableRightQuery() Many2ManyOption

func WithMany2ManyDisableRightUpdate

func WithMany2ManyDisableRightUpdate() Many2ManyOption

type Many2ManyOptions

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

type Many2ManyParams

type Many2ManyParams struct {
	// 除去后缀的服务URL,如http://localhost:8080/example/api/v1
	ServiceVersionedUrl string

	// 左领域名称
	LeftDomainCamelName string

	// 右领域名称
	RightDomainCamelName string
	// contains filtered or unexported fields
}

type One2ManyOption

type One2ManyOption func(options *One2ManyOptions)

func WithOne2ManyDisableLeft

func WithOne2ManyDisableLeft() One2ManyOption

func WithOne2ManyDisableLeftQuery

func WithOne2ManyDisableLeftQuery() One2ManyOption

func WithOne2ManyDisableLeftUpdate

func WithOne2ManyDisableLeftUpdate() One2ManyOption

func WithOne2ManyDisableRight

func WithOne2ManyDisableRight() One2ManyOption

func WithOne2ManyDisableRightQuery

func WithOne2ManyDisableRightQuery() One2ManyOption

func WithOne2ManyDisableRightUpdate

func WithOne2ManyDisableRightUpdate() One2ManyOption

func WithOne2ManyDisableRightWithLeftQuery

func WithOne2ManyDisableRightWithLeftQuery() One2ManyOption

type One2ManyOptions

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

type One2ManyParams

type One2ManyParams struct {
	// 除去后缀的服务URL,如http://localhost:8080/example/api/v1
	ServiceVersionedUrl string

	// 左领域名称
	LeftDomainCamelName string

	// 右领域名称
	RightDomainCamelName string
	// contains filtered or unexported fields
}

type One2OneOption

type One2OneOption func(options *One2OneOptions)

func WithOne2OneDisableLeft

func WithOne2OneDisableLeft() One2OneOption

func WithOne2OneDisableLeftQuery

func WithOne2OneDisableLeftQuery() One2OneOption

func WithOne2OneDisableLeftUpdate

func WithOne2OneDisableLeftUpdate() One2OneOption

func WithOne2OneDisableLeftWithRightQuery

func WithOne2OneDisableLeftWithRightQuery() One2OneOption

func WithOne2OneDisableRight

func WithOne2OneDisableRight() One2OneOption

func WithOne2OneDisableRightQuery

func WithOne2OneDisableRightQuery() One2OneOption

func WithOne2OneDisableRightUpdate

func WithOne2OneDisableRightUpdate() One2OneOption

func WithOne2OneDisableRightWithLeftQuery

func WithOne2OneDisableRightWithLeftQuery() One2OneOption

type One2OneOptions

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

type One2OneParams

type One2OneParams struct {
	// 除去后缀的服务URL,如http://localhost:8080/example/api/v1
	ServiceVersionedUrl string

	// 左领域名称
	LeftDomainCamelName string

	// 右领域名称
	RightDomainCamelName string
	// contains filtered or unexported fields
}

type OnePassThroughParams

type OnePassThroughParams struct {
	HttpMethod string
	*SimpleOnePassThroughParams
}

type PassThroughParams

type PassThroughParams struct {
	HttpMethod string
	*SimplePassThroughParams
}

type PassThroughRequestItem

type PassThroughRequestItem struct {
	Request                 gateway.BuilderRequest
	RequestResponseCallback gateway.RequestResponseCallback
}

type SimpleCommonPassThroughParams

type SimpleCommonPassThroughParams struct {
	RelativePath string
	RequestItems []PassThroughRequestItem
}

type SimpleOnePassThroughParams

type SimpleOnePassThroughParams struct {
	RelativePath string
	RequestItem  *PassThroughRequestItem
}

type SimplePassThroughParams

type SimplePassThroughParams struct {
	RelativePath string
	Request      gateway.BuilderRequest
}

type ValueObjectCRUDBuilderCallback added in v0.9.4

type ValueObjectCRUDBuilderCallback func(builder *gateway.Builder) *gateway.Builder

type ValueObjectCRUDCreateOption added in v0.5.2

type ValueObjectCRUDCreateOption func(options *ValueObjectCRUDCreateOptions)

func WithValueObjectCRUDAfterCreateBuilderCallback added in v0.9.4

func WithValueObjectCRUDAfterCreateBuilderCallback(callbacks ValueObjectCRUDBuilderCallback) ValueObjectCRUDCreateOption

func WithValueObjectCRUDBeforeCreateBuilderCallback added in v0.9.4

func WithValueObjectCRUDBeforeCreateBuilderCallback(callbacks ValueObjectCRUDBuilderCallback) ValueObjectCRUDCreateOption

func WithValueObjectCRUDCreateCallbacks added in v0.5.2

func WithValueObjectCRUDCreateCallbacks(callbacks gateway.RequestResponseCallback) ValueObjectCRUDCreateOption

func WithValueObjectCRUDCreateMiddlewares added in v0.5.2

func WithValueObjectCRUDCreateMiddlewares(middlewares []api.Handler) ValueObjectCRUDCreateOption

type ValueObjectCRUDCreateOptions added in v0.5.2

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

type ValueObjectCRUDDeleteOption added in v0.5.2

type ValueObjectCRUDDeleteOption func(options *ValueObjectCRUDDeleteOptions)

func WithValueObjectCRUDAfterDeleteBuilderCallback added in v0.9.4

func WithValueObjectCRUDAfterDeleteBuilderCallback(callbacks ValueObjectCRUDBuilderCallback) ValueObjectCRUDDeleteOption

func WithValueObjectCRUDBeforeDeleteBuilderCallback added in v0.9.4

func WithValueObjectCRUDBeforeDeleteBuilderCallback(callbacks ValueObjectCRUDBuilderCallback) ValueObjectCRUDDeleteOption

func WithValueObjectCRUDDeleteCallbacks added in v0.5.2

func WithValueObjectCRUDDeleteCallbacks(callbacks gateway.RequestResponseCallback) ValueObjectCRUDDeleteOption

func WithValueObjectCRUDDeleteMiddlewares added in v0.5.2

func WithValueObjectCRUDDeleteMiddlewares(middlewares []api.Handler) ValueObjectCRUDDeleteOption

func WithValueObjectCRUDDisableDelete added in v0.5.2

func WithValueObjectCRUDDisableDelete() ValueObjectCRUDDeleteOption

type ValueObjectCRUDDeleteOptions added in v0.5.2

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

type ValueObjectCRUDGlobalOption added in v0.9.1

type ValueObjectCRUDGlobalOption func(options *ValueObjectCRUDGlobalOptions)

func WithValueObjectCRUDGlobalMiddlewares added in v0.9.1

func WithValueObjectCRUDGlobalMiddlewares(middlewares ...api.Handler) ValueObjectCRUDGlobalOption

type ValueObjectCRUDGlobalOptions added in v0.9.1

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

type ValueObjectCRUDParams added in v0.5.2

type ValueObjectCRUDParams struct {
	// 除去后缀的服务URL,如http://localhost:8080/example/api/v1
	ServiceVersionedUrl string

	// 领域名称
	DomainCamelName string
	// contains filtered or unexported fields
}

type ValueObjectCRUDQueryOption added in v0.5.2

type ValueObjectCRUDQueryOption func(options *ValueObjectCRUDQueryOptions)

func WithValueObjectCRUDAfterQueryBuilderCallback added in v0.9.4

func WithValueObjectCRUDAfterQueryBuilderCallback(callbacks ValueObjectCRUDBuilderCallback) ValueObjectCRUDQueryOption

func WithValueObjectCRUDBeforeQueryBuilderCallback added in v0.9.4

func WithValueObjectCRUDBeforeQueryBuilderCallback(callbacks ValueObjectCRUDBuilderCallback) ValueObjectCRUDQueryOption

func WithValueObjectCRUDDisableQuery added in v0.5.2

func WithValueObjectCRUDDisableQuery() ValueObjectCRUDQueryOption

func WithValueObjectCRUDQueryCallbacks added in v0.5.2

func WithValueObjectCRUDQueryCallbacks(callbacks gateway.RequestResponseCallback) ValueObjectCRUDQueryOption

func WithValueObjectCRUDQueryMiddlewares added in v0.5.2

func WithValueObjectCRUDQueryMiddlewares(middlewares []api.Handler) ValueObjectCRUDQueryOption

type ValueObjectCRUDQueryOptions added in v0.5.2

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

Jump to

Keyboard shortcuts

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