config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Tables []TableMapping `json:"tables"`
	Schema string         `json:"schema"`
}

Config holds a zed schema and a tablemapping that generates that schema

type InternalRowMapping

type InternalRowMapping struct {
	ResourceType   string
	SubjectType    string
	Relation       string
	ResourceIDCols []int
	SubjectIDCols  []int
}

InternalRowMapping is a RowMapping with column names converted into column indexes, so that it can be used to parse the replication log

type InternalTableMapping

type InternalTableMapping struct {
	TableID              uint32
	RelationshipsByColID []InternalRowMapping
}

InternalTableMapping is a TableMapping with table names converted into internal postgres ids, so that it can be used to parse the replication log

type RowMapping

type RowMapping struct {
	ResourceType   string   `json:"resource_type"`
	SubjectType    string   `json:"subject_type"`
	Relation       string   `json:"relation"`
	ResourceIDCols []string `json:"resource_id_cols"`
	SubjectIDCols  []string `json:"subject_id_cols"`
}

RowMapping configures how to transform a row into a relationship

type TableMapping

type TableMapping struct {
	Name          string       `json:"name"`
	Relationships []RowMapping `json:"relationships,omitempty"`
}

TableMapping maps the name of a table to a set of configs for transforming rows into relationships

Jump to

Keyboard shortcuts

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