object

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 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 FeatureListParamParser

type FeatureListParamParser struct{}

func (FeatureListParamParser) GetDefaultSortBy

func (parser FeatureListParamParser) GetDefaultSortBy() string

func (FeatureListParamParser) GetSupportedSortBys

func (parser FeatureListParamParser) GetSupportedSortBys() []string

func (FeatureListParamParser) ParseValue

func (parser FeatureListParamParser) ParseValue(val string, sortBy string) (interface{}, error)

type FeatureService

type FeatureService struct {
	service.BaseService
	// contains filtered or unexported fields
}

func NewService

func NewService(env service.Env, objectSvc object.Service) *FeatureService

func (FeatureService) Create

func (svc FeatureService) Create(ctx context.Context, featureSpec FeatureSpec) (*FeatureSpec, error)

func (FeatureService) DeleteByFeatureId

func (svc FeatureService) DeleteByFeatureId(ctx context.Context, featureId string) error

func (FeatureService) GetByFeatureId

func (svc FeatureService) GetByFeatureId(ctx context.Context, featureId string) (*FeatureSpec, error)

func (FeatureService) List

func (svc FeatureService) List(ctx context.Context, listParams service.ListParams) ([]FeatureSpec, error)

func (FeatureService) Routes

func (svc FeatureService) Routes() ([]service.Route, error)

func (FeatureService) UpdateByFeatureId

func (svc FeatureService) UpdateByFeatureId(ctx context.Context, featureId string, featureSpec UpdateFeatureSpec) (*FeatureSpec, error)

type FeatureSpec

type FeatureSpec struct {
	FeatureId   string    `json:"featureId"   validate:"required,valid_object_id"`
	Name        *string   `json:"name"`
	Description *string   `json:"description"`
	CreatedAt   time.Time `json:"createdAt"`
}

func NewFeatureSpecFromObjectSpec

func NewFeatureSpecFromObjectSpec(objectSpec *object.ObjectSpec) (*FeatureSpec, error)

func (FeatureSpec) ToCreateObjectSpec

func (spec FeatureSpec) ToCreateObjectSpec() (*object.CreateObjectSpec, error)

type UpdateFeatureSpec

type UpdateFeatureSpec struct {
	Name        *string `json:"name"`
	Description *string `json:"description"`
}

func (UpdateFeatureSpec) ToUpdateObjectSpec

func (updateSpec UpdateFeatureSpec) ToUpdateObjectSpec() *object.UpdateObjectSpec

Jump to

Keyboard shortcuts

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