Documentation
¶
Overview ¶
Package convert provides dbq→proto conversion functions shared by api and realtime packages.
Index ¶
- func AnyToListValue(v any) *structpb.ListValue
- func AnyToStruct(v any) *structpb.Struct
- func MaskAPIKey(key string) string
- func PgTimestampToProto(t pgtype.Timestamptz) *timestamppb.Timestamp
- func PgUUIDToString(u pgtype.UUID) string
- func ProviderToProto(p dbq.Provider, decryptedKey string) *airlockv1.Provider
- func TenantToProto(t dbq.Tenant) *airlockv1.Tenant
- func UserToProto(u dbq.User) *airlockv1.User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyToListValue ¶
AnyToListValue marshals an arbitrary Go slice to a protobuf ListValue via JSON round-trip.
func AnyToStruct ¶
AnyToStruct marshals an arbitrary Go value to a protobuf Struct via JSON round-trip.
func MaskAPIKey ¶
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 ProviderToProto ¶
ProviderToProto converts a dbq.Provider to the proto type. The decryptedKey is used only for masking — the full key is never exposed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.