formatters

package
v0.2.97 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Copyright (c) "2024 Verosint, Inc"

Copyright (c) "2024 Verosint, Inc"

Copyright (c) "2024 Verosint, Inc"

Copyright (c) "2024 Verosint, Inc"

Copyright (c) "2024 Verosint, Inc"

Copyright (c) "2024 Verosint, Inc"

Index

Constants

View Source
const (
	LDAP_TIMESTAMP_LAYOUT = "20060102150405Z0700"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CsvReader

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

func NewCsvReader

func NewCsvReader(reader io.Reader, mappings map[string]string) (*CsvReader, error)

func (*CsvReader) Paths

func (r *CsvReader) Paths() []string

Get the paths to the attributes/columns that will be read

func (*CsvReader) Read

func (r *CsvReader) Read() (*Record, error)

type CsvWriter

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

func NewCsvWriter

func NewCsvWriter(writer io.Writer, columnPaths []string) (*CsvWriter, error)

func (*CsvWriter) Write

func (w *CsvWriter) Write(record *Record) error

type JsonWriter

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

func NewJsonWriter

func NewJsonWriter(writer io.Writer) (*JsonWriter, error)

func (*JsonWriter) Write

func (w *JsonWriter) Write(record any) error

type LdifReader

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

func NewLdifReader

func NewLdifReader(reader io.Reader, mappings map[string]string) (*LdifReader, error)

func (*LdifReader) Paths

func (r *LdifReader) Paths() []string

Get the paths to the attributes/columns that will be read

func (*LdifReader) Read

func (r *LdifReader) Read() (*Record, error)

func (*LdifReader) Unmarshal

func (r *LdifReader) Unmarshal(reader *bytes.Buffer, _ bool) (*Record, error)

type LdifWriter

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

func NewLdifWriter

func NewLdifWriter(writer io.Writer) (*LdifWriter, error)

func (*LdifWriter) Write

func (w *LdifWriter) Write(record *Record) error

type Reader

type Reader interface {
	Read() (*Record, error)
	Paths() []string
}

type Record

type Record struct {
	// Request data that was sent to 443ID
	ID          string                 `json:"id,omitempty"`
	Identifiers map[string]string      `json:"identifiers,omitempty"`
	Parameters  map[string]interface{} `json:"parameters,omitempty"`

	// Common response data that was returned from 443ID
	Version string `json:"version,omitempty"`
	// A map of categories to signals.
	Signals   map[string]map[string]interface{} `json:"signals,omitempty"`
	RequestId string                            `json:"requestId,omitempty"`
	Error     string                            `json:"error,omitempty"`

	// Rules evaluation response data that was returned from 443ID
	Outcomes []string `json:"outcomes,omitempty"`
	Reasons  []string `json:"reasons,omitempty"`
}

type Writer

type Writer interface {
	Write(*Record) error
}

Jump to

Keyboard shortcuts

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