common

package
v0.0.0-...-b9333f9 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Copyright (c) 2022 Skyflow, Inc.

Copyright (c) 2022 Skyflow, Inc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendRequestId

func AppendRequestId(message string, requestId string) string

func ConvertToMaps

func ConvertToMaps(data interface{}) ([]map[string]interface{}, error)

func CreateJsonMetadata

func CreateJsonMetadata() string

Types

type BYOT

type BYOT string
const (
	DISABLE       BYOT = "DISABLE"
	ENABLE        BYOT = "ENABLE"
	ENABLE_STRICT BYOT = "ENABLE_STRICT"
)

type Configuration

type Configuration struct {
	VaultID       string
	VaultURL      string
	TokenProvider TokenProvider
}

type ConnectionConfig

type ConnectionConfig struct {
	ConnectionURL string
	MethodName    RequestMethod
	PathParams    map[string]string
	QueryParams   map[string]interface{}
	RequestBody   map[string]interface{}
	RequestHeader map[string]string
}

type ContentType

type ContentType string
const (
	APPLICATIONORJSON ContentType = "application/json"
	TEXTORPLAIN       ContentType = "text/plain"
	FORMURLENCODED    ContentType = "application/x-www-form-urlencoded"
	FORMDATA          ContentType = "multipart/form-data"
	TEXTORXML         ContentType = "text/xml"
)

type DetokenizeError

type DetokenizeError struct {
	Token string
	Error ResponseError
}

type DetokenizeInput

type DetokenizeInput struct {
	Records []RevealRecord
}

type DetokenizeOptions

type DetokenizeOptions struct {
	Context         context.Context
	ContinueOnError bool
}

type DetokenizeRecord

type DetokenizeRecord struct {
	Token string
	Value string
}

type DetokenizeRecords

type DetokenizeRecords struct {
	Records []DetokenizeRecord
	Errors  []DetokenizeError
}

type GetByIdError

type GetByIdError struct {
	Ids   []string
	Error ResponseError
}

type GetByIdInput

type GetByIdInput struct {
	Records []SkyflowIdRecord
}

type GetByIdOptions

type GetByIdOptions struct {
	Context context.Context
}

type GetByIdRecord

type GetByIdRecord struct {
	Fields map[string]interface{}
	Table  string
}

type GetByIdRecords

type GetByIdRecords struct {
	Records []GetByIdRecord
	Errors  []GetByIdError
}

type GetError

type GetError struct {
	Ids          []string
	ColumnValues []string
	ColumnName   string
	Error        ResponseError
}

type GetInput

type GetInput struct {
	Records []SkyflowIdColumnRecordRecord
}

type GetOptions

type GetOptions struct {
	Context context.Context
	Tokens  bool

	Offset int
	Limit  int
}

type GetRecord

type GetRecord struct {
	Fields map[string]interface{}
	Table  string
}

type GetRecords

type GetRecords struct {
	Records []GetRecord
	Errors  []GetError
}

type InsertError

type InsertError struct {
	Error InsertResponseError
}

type InsertOptions

type InsertOptions struct {
	Tokens          bool
	Upsert          []UpsertOptions
	Context         context.Context
	ContinueOnError bool
	Byot            BYOT
}

type InsertRecord

type InsertRecord struct {
	RequestIndex int `json:"request_index"`
	Table        string
	Fields       map[string]interface{}
	Tokens       map[string]interface{}
}

type InsertRecords

type InsertRecords struct {
	Records []InsertRecord
	Errors  []InsertError
}

type InsertResponseError

type InsertResponseError struct {
	RequestIndex int `json:"request_index"`
	Code         string
	Description  string
}

type RedactionType

type RedactionType string
const (
	DEFAULT    RedactionType = "DEFAULT"
	PLAIN_TEXT RedactionType = "PLAIN_TEXT"
	MASKED     RedactionType = "MASKED"
	REDACTED   RedactionType = "REDACTED"
)

type RequestMethod

type RequestMethod int
const (
	GET RequestMethod = iota
	POST
	PUT
	PATCH
	DELETE
)

func (RequestMethod) String

func (requestMethod RequestMethod) String() string

type ResponseBody

type ResponseBody map[string]interface{}

type ResponseError

type ResponseError struct {
	Code        string
	Description string
}

type RevealRecord

type RevealRecord struct {
	Token     string
	Redaction string
}

type SkyflowIdColumnRecordRecord

type SkyflowIdColumnRecordRecord struct {
	Ids          []string
	Redaction    RedactionType
	Table        string
	ColumnValues []string
	ColumnName   string
}

type SkyflowIdRecord

type SkyflowIdRecord struct {
	Ids       []string
	Redaction RedactionType
	Table     string
}

type TokenProvider

type TokenProvider func() (string, error)

type UpsertOptions

type UpsertOptions struct {
	Table  string
	Column string
}

Jump to

Keyboard shortcuts

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