types

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	RawContext context.Context
	TypedMap
	RemoteLoadeds  RemoteLoadeds
	RequiredParams []string
	Resolver
	Loader
	RequiredConfigured bool
}

Context its used to store parameters and temporary variables during rule assertions

func NewContext

func NewContext() *Context

NewContext method create a new Context

func NewContextFromMap

func NewContextFromMap(values map[string]interface{}) *Context

NewContextFromMap method create a new Context from map

func (*Context) GetEntry

func (c *Context) GetEntry(param string) interface{}

GetEntry ...

func (*Context) IsReady

func (c *Context) IsReady() bool

IsReady ...

func (*Context) RegistryRemoteLoaded

func (c *Context) RegistryRemoteLoaded(param string, resolver string)

RegistryRemoteLoaded ...

func (*Context) RegistryRemoteLoadedWithFrom

func (c *Context) RegistryRemoteLoadedWithFrom(param string, resolver string, from string)

RegistryRemoteLoadedWithFrom ...

func (*Context) RegistryRequiredParams

func (c *Context) RegistryRequiredParams(params ...string)

RegistryRequiredParams ...

func (*Context) SetRequiredConfigured

func (c *Context) SetRequiredConfigured()

SetRequiredConfigured ...

type Getter

type Getter interface {
	GetEntry(param string) interface{}
}

Getter ...

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient ...

var Client HTTPClient = newHTTPClient()

Client ...

type Loader

type Loader interface {
	// contains filtered or unexported methods
}

Loader ...

type RemoteLoaded

type RemoteLoaded struct {
	Resolver string
	From     string
}

RemoteLoaded ...

type RemoteLoadeds

type RemoteLoadeds map[string]RemoteLoaded

RemoteLoadeds ...

type Resolver

type Resolver interface {
	// contains filtered or unexported methods
}

Resolver ...

type Result

type Result struct {
	TypedMap
}

Result its used to store features in end rule assertions

func NewResult

func NewResult() *Result

NewResult method create a new Result

func (*Result) GetFeatures

func (r *Result) GetFeatures() map[string]interface{}

GetFeatures get list of features

type TypedMap

type TypedMap struct {
	Getter
	// contains filtered or unexported fields
}

TypedMap its a map with method to gets entries with specific types

func NewTypedMap

func NewTypedMap() *TypedMap

NewTypedMap method create a new TypedMap

func NewTypedMapFromMap

func NewTypedMapFromMap(values map[string]interface{}) *TypedMap

NewTypedMapFromMap method create a new TypedMap

func (*TypedMap) AddItem

func (c *TypedMap) AddItem(param string, item interface{}) []interface{}

AddItem method inserts a item into a slice of map

func (*TypedMap) AddItems

func (c *TypedMap) AddItems(param string, items ...interface{}) []interface{}

AddItems methos insert some items into a slice of map

func (*TypedMap) Get

func (c *TypedMap) Get(param string) interface{}

Get method get a generic entry of map

func (*TypedMap) GetBool

func (c *TypedMap) GetBool(param string) bool

GetBool method get a bool entry of map

func (*TypedMap) GetEntries

func (c *TypedMap) GetEntries() map[string]interface{}

GetEntries method get all entries of map

func (*TypedMap) GetEntry

func (c *TypedMap) GetEntry(param string) interface{}

GetEntry ...

func (*TypedMap) GetFloat

func (c *TypedMap) GetFloat(param string) float64

GetFloat method get a int entry of map

func (*TypedMap) GetInt

func (c *TypedMap) GetInt(param string) int64

GetInt method get a int entry of map

func (*TypedMap) GetMap

func (c *TypedMap) GetMap(param string) *TypedMap

GetMap method get a TypedMap entry of map

func (*TypedMap) GetSlice

func (c *TypedMap) GetSlice(param string) []interface{}

GetSlice method get a slice entry of map

func (*TypedMap) GetString

func (c *TypedMap) GetString(param string) string

GetString method get a string entry of map

func (*TypedMap) Has

func (c *TypedMap) Has(param string) bool

Has method verify if a param exists in map

func (*TypedMap) Put

func (c *TypedMap) Put(param string, value interface{})

Put method inserts a generic entry on map

Jump to

Keyboard shortcuts

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