schedules

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Provides = wire.NewSet(
	wire.Struct(new(Controller), "*"),
	wire.Struct(new(Service), "*"),
)

Functions

This section is empty.

Types

type Controller

type Controller struct {
	SchedulesService *Service
}

func (*Controller) Keys

func (x *Controller) Keys(ctx context.Context, c *app.RequestContext)

func (*Controller) Ping

func (x *Controller) Ping(_ context.Context, c *app.RequestContext)

func (*Controller) Revoke

func (x *Controller) Revoke(_ context.Context, c *app.RequestContext)

func (*Controller) State added in v0.1.8

func (x *Controller) State(_ context.Context, c *app.RequestContext)

type KeysDto

type KeysDto struct {
	Id string `path:"id" vd:"mongodb"`
}

type M

type M = map[string]interface{}

type PingDto

type PingDto struct {
	Nodes []string `json:"nodes" vd:"gt=0"`
}

type RevokeDto

type RevokeDto struct {
	Id  string `json:"id" vd:"required"`
	Key string `json:"key" vd:"required"`
}

type Service

type Service struct {
	*common.Inject
}

func (*Service) Client added in v0.1.8

func (x *Service) Client(node string) (client *schedule.Client, err error)

func (*Service) Keys

func (x *Service) Keys(ctx context.Context, id primitive.ObjectID) (keys []string, err error)

func (*Service) Ping

func (x *Service) Ping(node string) (r bool, err error)

func (*Service) Revoke

func (x *Service) Revoke(node string, key string) (err error)

func (*Service) Set

func (x *Service) Set(ctx context.Context, id primitive.ObjectID, key string, option sctyp.ScheduleOption) (err error)

func (*Service) State added in v0.1.8

func (x *Service) State(node string, key string) (r sctyp.ScheduleOption, err error)

type StatesDto added in v0.1.8

type StatesDto struct {
	Node string `json:"node" vd:"required"`
	Key  string `json:"key" vd:"required"`
}

Jump to

Keyboard shortcuts

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