pkg

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

+bulid tools

Index

Constants

This section is empty.

Variables

View Source
var DebugMode = false
View Source
var Logger *log.Logger

Functions

func StartDrawioServer

func StartDrawioServer(wg *sync.WaitGroup) (*http.Server, string)

Types

type Bounds

type Bounds struct {
	X      float64 `json:"x"`
	Y      float64 `json:"y"`
	Width  int64   `json:"width"`
	Height int64   `json:"height"`
}

type ConvertData

type ConvertData struct {
	XMLString       string
	Format          string
	Width           int
	Height          int
	Border          int
	BackgroundColor string
	// From            int
	// To              int
	PageId string
	Scale  float64
	Extras string
}

func (*ConvertData) ToRenderParams

func (d *ConvertData) ToRenderParams() string

ToRenderparams returns JavaScript styled JSON String that all key aren't enclosed by double quote

type Diagram

type Diagram struct {
	Path     string
	RelPath  string
	Elements []DiagramElement
	XMLBody  string
}

func ReadDir

func ReadDir(root string, extList []string) ([]*Diagram, error)

func (*Diagram) Export

func (d *Diagram) Export(addr, format, bgColor, dest string) error

type DiagramElement

type DiagramElement struct {
	Id         string `xml:"id,attr"`
	Name       string `xml:"name,attr"`
	GraphModel struct {
		Width  string `xml:"dx"`
		Height string `xml:"dy"`
		Scale  string `xml:"pageScale"`
	} `xml:"mxGraphModel"`
}

type DiagramWalker

type DiagramWalker struct {
	Diagrams []*Diagram
}

Jump to

Keyboard shortcuts

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