datasets

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 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 {
	DatasetsService *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"`
	Kind   string          `json:"kind"`
	Option CreateOptionDto `json:"option,omitempty"`
}

type CreateOptionDto

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

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,required"`
}

type ListsDto

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

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