formatters

package
v0.1.162 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Copyright (c) 2022 Take 2 Identity, Inc

Copyright (c) 2022 Take 2 Identity, 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 added in v0.1.110

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 *Record) 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 added in v0.1.110

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 added in v0.1.123

func (r *LdifReader) Unmarshal(reader *bytes.Buffer, eof 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"`
	RequestId string `json:"requestId,omitempty"`
	Error     string `json:"error,omitempty"`

	// Risk score response data that was returned from 443ID
	Score    float64 `json:"score,omitempty"`
	LevelTxt string  `json:"levelTxt,omitempty"`
	LevelNum int     `json:"levelNum,omitempty"`

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

	// Event ingestion response data that was returned from 443ID
	PrintId string `json:"printId,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