ffi2abi

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// InputTypeInteger is a json integer or string to be treated as an integer
	InputTypeInteger = fftypes.FFEnumValue("ffiinputtype", "integer")
	// InputTypeNumber is a json number or string to be treated as an integer
	InputTypeNumber = fftypes.FFEnumValue("ffiinputtype", "number")
	// InputTypeString is a JSON string
	InputTypeString = fftypes.FFEnumValue("ffiinputtype", "string")
	// FFIInputTypeArray is a JSON boolean
	InputTypeBoolean = fftypes.FFEnumValue("ffiinputtype", "boolean")
	// InputTypeArray is a JSON array
	InputTypeArray = fftypes.FFEnumValue("ffiinputtype", "array")
	// InputTypeObject is a JSON object
	InputTypeObject = fftypes.FFEnumValue("ffiinputtype", "object")
)

Functions

func ABIArgumentToTypeString

func ABIArgumentToTypeString(typeName string, components abi.ParameterArray) string

func ABIMethodToSignature

func ABIMethodToSignature(abi *abi.Entry) string

func ConvertABIToFFI

func ConvertABIToFFI(ctx context.Context, ns, name, version, description string, abi *abi.ABI) (*fftypes.FFI, error)

func ConvertFFIErrorDefinitionToABI added in v1.1.5

func ConvertFFIErrorDefinitionToABI(ctx context.Context, errorDef *fftypes.FFIErrorDefinition) (*abi.Entry, error)

func ConvertFFIEventDefinitionToABI

func ConvertFFIEventDefinitionToABI(ctx context.Context, event *fftypes.FFIEventDefinition) (*abi.Entry, error)

func ConvertFFIMethodToABI

func ConvertFFIMethodToABI(ctx context.Context, method *fftypes.FFIMethod) (*abi.Entry, error)

Types

type InputType

type InputType = fftypes.FFEnum

InputType is the type of a JSON field in a request to FireFly's API

type ParamValidator

type ParamValidator struct{}

func (*ParamValidator) Compile

func (v *ParamValidator) Compile(_ jsonschema.CompilerContext, _ map[string]interface{}) (jsonschema.ExtSchema, error)

func (*ParamValidator) GetExtensionName

func (v *ParamValidator) GetExtensionName() string

func (*ParamValidator) GetMetaSchema

func (v *ParamValidator) GetMetaSchema() *jsonschema.Schema

type Schema

type Schema struct {
	Type        string             `json:"type,omitempty"`
	OneOf       []SchemaType       `json:"oneOf,omitempty"`
	Details     *paramDetails      `json:"details,omitempty"`
	Properties  map[string]*Schema `json:"properties,omitempty"`
	Items       *Schema            `json:"items,omitempty"`
	Description string             `json:"description,omitempty"`
}

func (*Schema) ToJSON

func (s *Schema) ToJSON() string

type SchemaType

type SchemaType struct {
	Type string `json:"type"`
}

Jump to

Keyboard shortcuts

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