strategy

package
v1.3.4-beta Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

type Commit struct {
	Id       string
	Name     string
	Priority int
	Filters  string
	Config   string
	Driver   string
	IsDelete bool
	IsStop   bool
	Version  string
}

type Create

type Create struct {
	Id       string
	Name     string
	Priority int
	Desc     string
	Filters  string
	Config   string
	Scope    int
	Target   string
	Driver   string
}

type Edit

type Edit struct {
	Name     *string
	Priority *int
	Desc     *string
	Filters  *string
	Config   *string
	IsStop   *bool
}

type IStrategyService

type IStrategyService interface {
	universally.IServiceCreate[Create]
	universally.IServiceEdit[Edit]
	All(ctx context.Context, scope int, target string) ([]*Strategy, error)
	AllByDriver(ctx context.Context, driver string, scope int, target string) ([]*Strategy, error)
	SearchByDriver(ctx context.Context, keyword string, driver string, scope int, target string, page int, pageSize int, filters []string, order ...string) ([]*Strategy, int64, error)
	SearchAllByDriver(ctx context.Context, keyword string, driver string, scope int, target string) ([]*Strategy, error)
	Get(ctx context.Context, id string) (*Strategy, error)
	SortDelete(ctx context.Context, id string) error
	Delete(ctx context.Context, id ...string) error

	Restore(ctx context.Context, id string) error

	CommitStrategy(ctx context.Context, scope string, target string, strategyId string, data *Strategy) error
	GetStrategyCommit(ctx context.Context, commitId string) (*commit.Commit[Commit], error)
	LatestStrategyCommit(ctx context.Context, scope string, target string, strategyId string) (*commit.Commit[Commit], error)
	ListLatestStrategyCommit(ctx context.Context, scope string, target string, strategyIds ...string) ([]*commit.Commit[Commit], error)
	ListStrategyCommit(ctx context.Context, commitIds ...string) ([]*commit.Commit[Commit], error)
}

type Strategy

type Strategy struct {
	Id       string
	Name     string
	Priority int
	Desc     string
	Filters  string
	Config   string
	Driver   string
	Scope    int
	Target   string
	Creator  string
	Updater  string
	CreateAt time.Time
	UpdateAt time.Time
	IsStop   bool
	IsDelete bool
}

func FromEntity

func FromEntity(e *strategy.Strategy) *Strategy

Jump to

Keyboard shortcuts

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