Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentSchema ¶
type DocumentSchema map[string]FieldMetadata
DocumentSchema represents the schema of a document.
type FieldMetadata ¶
type FieldMetadata struct {
Name string `json:"NAME"`
Active bool `json:"ACTIVE"`
Type string `json:"TYPE"`
Nullable bool `json:"NULLABLE"`
Size *int `json:"SIZE,omitempty"` // Optional
RecordType map[string]FieldMetadata `json:"RECORD_TYPE,omitempty"` // For nested records
Formula *string `json:"FORMULA,omitempty"` // Optional
DocumentType *string `json:"DOCUMENT_TYPE,omitempty"` // For document references
DateUnzoned *bool `json:"DATE_UNZONED,omitempty"` // Optional for datetime
}
FieldMetadata represents metadata for a single field.
type RootSchema ¶
type RootSchema map[string]DocumentSchema
RootSchema represents the entire JSON structure.
func FetchSchema ¶ added in v0.1.10
func FetchSchema(cfg config.Config) (RootSchema, error)
FetchSchema retrieves the schema of documents from the Execute API. It takes a configuration object `cfg` containing the API endpoint and credentials. The function returns a `RootSchema` representing the document schema and an error if any occurs.
Click to show internal directories.
Click to hide internal directories.