bluecore

package
v0.0.0-...-9df5e0b Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastToString

func CastToString(v interface{}) (string, error)

func Lesson

func Lesson(cfg Config) error

func OpenFile

func OpenFile(cfg Config) (f afero.File, err error)

func OutputJSON

func OutputJSON(jc Journey) (data string, err error)

func ProcessJsonRaw

func ProcessJsonRaw(data []byte) error

func ReadFileData

func ReadFileData(cfg Config) (data []byte, err error)

Types

type Config

type Config struct {
	FilePath string
	Fs       afero.Fs
}

type CustomTime

type CustomTime time.Time

func (*CustomTime) UnmarshalJSON

func (t *CustomTime) UnmarshalJSON(data []byte) (err error)

type Draft

type Draft struct{}

type Journey

type Journey struct {
	Classification string         `json:"classification"`
	Creator        string         `json:"creator"`
	Id             int            `json:"id"`
	SegmentIds     []int          `json:"segment_ids"`
	TouchToCampMap map[string]int `json:"touch_to_campaign_map"`
	Nodes          Nodes          `json:"nodes"`
	SomeRandomProp *string        `json:"some_random_prop,omitempty"`
	Name           interface{}    `json:"name"`
	Key            Key            `json:"key"`
	Created        CustomTime     `json:"created"`
}

func ProcessJsonJC

func ProcessJsonJC(data []byte) (Journey, error)

type Key

type Key struct {
	Name  string
	Other string
	Len   int
}

func (*Key) UnmarshalJSON

func (k *Key) UnmarshalJSON(data []byte) (err error)

type Node

type Node map[string]any

func (*Node) AddNode

func (n *Node) AddNode(m map[string]any)

type Nodes

type Nodes map[string]Node

func (*Nodes) UnmarshalJSON

func (n *Nodes) UnmarshalJSON(data []byte) (err error)

type Published

type Published struct{}

Jump to

Keyboard shortcuts

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