firex

package
v0.0.0-...-fb67617 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaNotFound         = Error(1)
	ValueNotMatchingSchema = Error(2)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CELParams

type CELParams struct {
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Dir    string
	DSN    string
	Domain string
	Port   int
}

type Error

type Error int

func (Error) Error

func (e Error) Error() string

type Handler

type Handler interface {
	SetSettings(ctx context.Context, value *JSON, opts fx.SettingsOptions) error
	GetSettings(ctx context.Context, opts fx.SettingsOptions) (*JSON, error)

	RegisterUser(ctx context.Context, user *ent.User, opts fx.UserOptions) error
	ListUsers(ctx context.Context, opts fx.UserOptions) ([]*ent.User, error)
	CreateUser(ctx context.Context, user *ent.User) error
	ValidateUser(ctx context.Context, username string, opts fx.UserOptions) error
	UserInfo(ctx context.Context, username string, opts fx.UserOptions) (*ent.User, error)

	GetCollections(ctx context.Context) ([]string, error)

	PutData(ctx context.Context, data *fx.Data, opts fx.PutDataOptions) error
	PatchData(ctx context.Context, collection string, id string, content io.Reader, size int64, opts fx.PatchOptions) error
	GetData(ctx context.Context, collection string, id string, opts fx.GetDataOptions) (*fx.Data, error)
	Info(ctx context.Context, collection string, id string) (*fx.Info, error)
	Delete(ctx context.Context, collection string, id string) error
	List(ctx context.Context, collection string, opts fx.ListOptions) (*fx.DataList, error)

	SaveGraft(ctx context.Context, graft *fx.Graft) (string, error)
	GetGraft(ctx context.Context, collection string, dataID string, id string) (*fx.Graft, error)
	GraftInfo(ctx context.Context, collection string, dataID string, id string) (*fx.GraftInfo, error)
	ListGrafts(ctx context.Context, collection string, dataID string, opts fx.ListOptions) (*fx.GraftList, error)
	DeleteGraft(ctx context.Context, collection string, dataID string, id string) error
}

type JSON

type JSON struct {
	Object interface{}
}

func (*JSON) Get

func (s *JSON) Get(name string) (*JSON, error)

func (*JSON) Int

func (s *JSON) Int(name string) (int, error)

func (*JSON) Int32

func (s *JSON) Int32(name string) (int32, error)

func (*JSON) Int64

func (s *JSON) Int64(name string) (int64, error)

func (*JSON) String

func (s *JSON) String(name string) (string, error)

func (*JSON) ToInt

func (s *JSON) ToInt() (int, error)

func (*JSON) ToInt32

func (s *JSON) ToInt32() (int32, error)

func (*JSON) ToInt64

func (s *JSON) ToInt64() (int64, error)

func (*JSON) ToString

func (s *JSON) ToString() (string, error)

type RouteOption

type RouteOption func(*routes)

func SkipExec

func SkipExec() RouteOption

func SkipParamsCheck

func SkipParamsCheck() RouteOption

func SkipPoliciesCheck

func SkipPoliciesCheck() RouteOption

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(config Config, opts ...netx.ListenOption) *Server

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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