io

package
v0.0.0-...-20457bb Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExamples

func GetExamples(ext string) ([]string, error)

func IsUrl

func IsUrl(addr string) bool

func ReadUrl

func ReadUrl(addr string) (io.Reader, error)

Types

type CSVIO

type CSVIO struct {
	Comments  string
	Delimiter string
	SourceCol string
	TargetCol string
	Directed  bool
}

func NewCSVIO

func NewCSVIO(comment, delimiter string, source string, target string, directed bool) *CSVIO

func (*CSVIO) ReadGraph

func (csvio *CSVIO) ReadGraph(reader io.Reader) (*models.Graph, error)

func (*CSVIO) WriteGraph

func (csvio *CSVIO) WriteGraph(graph *models.Graph, writer io.Writer) error

type EdgeListIO

type EdgeListIO struct {
	Comments  string
	Delimiter string
	Directed  bool
}

func NewEdgeListIO

func NewEdgeListIO(comment, delimiter string, directed bool) *EdgeListIO

func (*EdgeListIO) ReadGraph

func (elio *EdgeListIO) ReadGraph(reader io.Reader) (*models.Graph, error)

func (*EdgeListIO) WriteGraph

func (elio *EdgeListIO) WriteGraph(graph *models.Graph, writer io.Writer) error

type GraphIO

type GraphIO interface {
	ReadGraph(reader io.Reader) (*models.Graph, error)
	WriteGraph(graph *models.Graph, writer io.Writer) error
}

type GraphologyIO

type GraphologyIO struct {
}

func NewGraphologyIO

func NewGraphologyIO() *GraphologyIO

func (*GraphologyIO) ReadGraph

func (graphologyio *GraphologyIO) ReadGraph(reader io.Reader) (*models.Graph, error)

func (*GraphologyIO) WriteGraph

func (graphologyio *GraphologyIO) WriteGraph(graph *models.Graph, writer io.Writer) error

type JSONIO

type JSONIO struct {
}

func NewJSONIO

func NewJSONIO() *JSONIO

func (*JSONIO) ReadGraph

func (jsonio *JSONIO) ReadGraph(reader io.Reader) (*models.Graph, error)

func (*JSONIO) WriteGraph

func (jsonio *JSONIO) WriteGraph(graph *models.Graph, writer io.Writer) error

Jump to

Keyboard shortcuts

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