Help us shape the future of Go! Take the 2026 Go Developer Survey

endpoints

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 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 {
	EndpointsX *Service
}

func (*Controller) ScheduleKeys

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

func (*Controller) SchedulePing

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

func (*Controller) ScheduleRevoke

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

func (*Controller) ScheduleState

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

type M

type M = map[string]interface{}

type ScheduleKeysDto

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

type SchedulePingDto

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

type ScheduleRevokeDto

type ScheduleRevokeDto struct {
	Id  primitive.ObjectID `json:"id" vd:"required"`
	Key string             `json:"key" vd:"required"`
}

type ScheduleStatesDto

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

type Service

type Service struct {
	*common.Inject
}

func (*Service) Schedule

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

func (*Service) ScheduleKeys

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

func (*Service) SchedulePing

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

func (*Service) ScheduleRevoke

func (x *Service) ScheduleRevoke(ctx context.Context, id primitive.ObjectID, key string) (err error)

func (*Service) ScheduleSet

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

func (*Service) ScheduleState

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

Jump to

Keyboard shortcuts

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