introspection

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argument

type Argument struct {
	Name         string
	GoName       string
	Type         string
	GoType       string
	CType        string
	Description  string
	IsRequired   bool
	IsInput      bool
	IsInputN     bool
	IsOutput     bool
	IsOutputN    bool
	IsSource     bool
	IsTarget     bool
	IsImage      bool
	IsBuffer     bool
	IsArray      bool
	Flags        int
	IsEnum       bool
	EnumType     string
	NInputFrom   string
	DefaultValue interface{}
}

Argument represents an argument to a libvips operation

type EnumTypeInfo

type EnumTypeInfo struct {
	CName       string // Original C name (e.g. VipsInterpretation)
	GoName      string // Go name (e.g. Interpretation)
	Description string
	Values      []EnumValueInfo
}

EnumTypeInfo holds information about a vips enum type

type EnumValueInfo

type EnumValueInfo struct {
	CName       string // C name
	GoName      string // Go name
	Value       int    // Numeric value
	Description string
}

EnumValueInfo holds information about an enum value

type ImageTypeInfo

type ImageTypeInfo struct {
	TypeName  string // Short name (e.g., "gif")
	EnumName  string // Go enum name (e.g., "ImageTypeGIF")
	EnumValue string // String value for the enum (e.g., "gif")
	MimeType  string // MIME type (e.g., "image/gif")
	Order     int    // Position in the enum
	HasLoader bool
	HasSaver  bool
}

ImageTypeInfo represents information about an image type

type Introspection

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

Introspection provides discovery and analysis of libvips operations through GObject Introspection, extracting operation metadata, argument details, and supported enum types.

func NewIntrospection

func NewIntrospection(isDebug bool) *Introspection

NewIntrospection creates a new Introspection instance for analyzing libvips operations, initializing the libvips library in the process.

func (*Introspection) DiscoverEnumTypes

func (v *Introspection) DiscoverEnumTypes() []EnumTypeInfo

DiscoverEnumTypes retrieves all enum types from libvips

func (*Introspection) DiscoverImageTypes

func (v *Introspection) DiscoverImageTypes() []ImageTypeInfo

DiscoverImageTypes discovers supported image types by scanning available operations

func (*Introspection) DiscoverOperationArguments

func (v *Introspection) DiscoverOperationArguments(opName string) ([]Argument, error)

DiscoverOperationArguments uses GObject introspection to extract all arguments for an operation

func (*Introspection) DiscoverOperations

func (v *Introspection) DiscoverOperations() []Operation

DiscoverOperations uses GObject introspection to discover all available operations

func (*Introspection) GetVipsVersion added in v0.9.2

func (v *Introspection) GetVipsVersion() string

GetVipsVersion returns the libvips version string

type Operation

type Operation struct {
	Name               string
	GoName             string
	Description        string
	Arguments          []Argument
	RequiredInputs     []Argument
	OptionalInputs     []Argument
	RequiredOutputs    []Argument
	OptionalOutputs    []Argument
	HasThisImageInput  bool
	HasImageOutput     bool
	HasOneImageOutput  bool
	HasBufferInput     bool
	HasBufferOutput    bool
	HasArrayImageInput bool
	ImageTypeString    string
}

Operation represents a libvips operation

Jump to

Keyboard shortcuts

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