fs

package
v0.2.59 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecodeFunc

type DecodeFunc[T any] func(node *yml.Node, t *T) error

DecodeFunc is a function type that decodes a YAML node into a specific type

type Option

type Option[T any] func(s *Service[T])

func WithMetaService

func WithMetaService[T any](meta *meta.Service) Option[T]

type Service

type Service[T any] struct {
	// contains filtered or unexported fields
}

Service provides model data access operations

func New

func New[T any](decoderFunc DecodeFunc[T], options ...Option[T]) *Service[T]

New creates a new model service instance

func (*Service[T]) List

func (s *Service[T]) List(ctx context.Context, URL string) ([]*T, error)

func (*Service[T]) Load

func (s *Service[T]) Load(ctx context.Context, URL string) (*T, error)

Load loads a model from the specified URL

type Validator

type Validator interface {
	Validate(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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