convert

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package convert provides dbq→proto conversion functions shared by api and realtime packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyToListValue

func AnyToListValue(v any) *structpb.ListValue

AnyToListValue marshals an arbitrary Go slice to a protobuf ListValue via JSON round-trip.

func AnyToStruct

func AnyToStruct(v any) *structpb.Struct

AnyToStruct marshals an arbitrary Go value to a protobuf Struct via JSON round-trip.

func MaskAPIKey

func MaskAPIKey(key string) string

MaskAPIKey returns a masked version of an API key for display. Shows first 3 and last 4 characters: "sk-...key1". Keys shorter than 8 characters are fully masked.

func PgTimestampToProto

func PgTimestampToProto(t pgtype.Timestamptz) *timestamppb.Timestamp

func PgUUIDToString

func PgUUIDToString(u pgtype.UUID) string

func ProviderToProto

func ProviderToProto(p dbq.Provider, decryptedKey string) *airlockv1.Provider

ProviderToProto converts a dbq.Provider to the proto type. The decryptedKey is used only for masking — the full key is never exposed.

func TenantToProto

func TenantToProto(t dbq.Tenant) *airlockv1.Tenant

func UserToProto

func UserToProto(u dbq.User) *airlockv1.User

Types

This section is empty.

Jump to

Keyboard shortcuts

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