datasets

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: 9 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 {
	DatasetsX *Service
}

func (*Controller) Create

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

func (*Controller) Delete

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

func (*Controller) Lists

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

type CreateDto

type CreateDto struct {
	Name   string           `json:"name" vd:"required"`
	Kind   string           `json:"kind" vd:"oneof='collection' 'timeseries'"`
	Option *CreateOptionDto `json:"option" vd:"required_if=kind 'timeseries'"`
}

type CreateOptionDto

type CreateOptionDto struct {
	Time   string `json:"time" vd:"required"`
	Meta   string `json:"meta" vd:"required"`
	Expire *int64 `json:"expire" vd:"required"`
}

type Dataset

type Dataset struct {
	Name       string   `bson:"name" json:"name"`
	Type       string   `bson:"type" json:"type"`
	Keys       []string `bson:"-" json:"keys"`
	Sensitives []string `bson:"-" json:"sensitives"`
	Status     bool     `bson:"-" json:"status"`
	Event      bool     `bson:"-" json:"event"`
	Options    M        `bson:"options" json:"options"`
}

type DeleteDto

type DeleteDto struct {
	Name string `path:"name" vd:"required"`
}

type ListsDto

type ListsDto struct {
	Name string `query:"name"`
}

type M

type M map[string]interface{}

type Service

type Service struct {
	*common.Inject
	Values *values.Service
}

func (*Service) Create

func (x *Service) Create(ctx context.Context, dto CreateDto) (err error)

func (*Service) Delete

func (x *Service) Delete(ctx context.Context, name string) (err error)

func (*Service) Lists

func (x *Service) Lists(ctx context.Context, name string) (data []Dataset, err error)

Jump to

Keyboard shortcuts

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