Documentation ¶
Overview ¶
Copyright 2021 Cloud Privacy Labs, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func InitConfig(cfg Config)
- func NewDocumentGraph() *lpg.Graph
- func ReadFileOrStdin(input []string) ([]byte, error)
- func ReadGraph(gfile []string, interner ls.Interner, inputFormat string) (*lpg.Graph, error)
- func ReadGraphFromReader(ctx context.Context, reader io.Reader, interner ls.Interner, ...) (<-chan GraphStream, error)
- func ReadJSON(input string, output interface{}, enc ...encoding.Encoding) error
- func ReadJSONFileOrStdin(input []string, output interface{}, enc ...encoding.Encoding) error
- func ReadJSONGraph(gfile []string, interner ls.Interner) (*lpg.Graph, error)
- func ReadJSONLDGraph(gfile []string, interner ls.Interner) (*lpg.Graph, error)
- func ReadJSONMultiple(input []string) ([]interface{}, error)
- func ReadJSONOrYAML(input string, output interface{}, enc ...encoding.Encoding) error
- func ReadSheets(fileName string) ([][][]string, error)
- func ReadSpreadsheetFile(fileName string) (map[string][][]string, error)
- func ReadURL(input string, enc ...encoding.Encoding) ([]byte, error)
- func StreamFileOrStdin(input []string, enc ...encoding.Encoding) (io.Reader, error)
- func StreamGraph(ctx context.Context, file []string, interner ls.Interner, inputFormat string) (<-chan GraphStream, error)
- func StreamJSONGraph(ctx context.Context, file []string, interner ls.Interner) (<-chan GraphStream, error)
- func StreamJSONLDGraph(ctx context.Context, file []string, interner ls.Interner) (<-chan GraphStream, error)
- func WriteGraph(cmd *cobra.Command, graph *lpg.Graph, format string, out io.Writer) error
- func YAMLToMap(in interface{}) interface{}
- type Config
- type GraphStream
Constants ¶
const JSSource = `` /* 7932-byte string literal not displayed */
JSSource returns the svgpan.js file
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
func InitConfig(cfg Config)
func NewDocumentGraph ¶
func NewDocumentGraph() *lpg.Graph
func ReadFileOrStdin ¶
ReadFileOrStdin reads a file or reads stdin
func ReadGraphFromReader ¶
func ReadJSONFileOrStdin ¶
ReadJSONFileOrStdin reads a JSON file(s), or if there are none, reads from stdin
func ReadJSONLDGraph ¶
func ReadJSONMultiple ¶
ReadJSONMultiple reads multiple JSON files
func ReadJSONOrYAML ¶
func ReadSheets ¶
ReadSpreadsheetFile reads a CSV or Excel file. For CSV, it will look at the environment variable CSV_SEPARATOR. For Excel, it will load all the spreadsheets
func StreamFileOrStdin ¶
StreamFileOrStdin reads file(s), or if there are none, reads frm stdin
func StreamGraph ¶
func StreamJSONGraph ¶
func StreamJSONLDGraph ¶
func WriteGraph ¶
Types ¶
type Config ¶
type Config struct {
IndexedProperties []string `json:"indexedProperties" yaml:"indexedProperties"`
}
type GraphStream ¶
type GraphStream struct { G *lpg.Graph Err error }