✨ Upgrade Go version to 1.23.0 and update dependencies. Introduce new application structure with Clean Architecture principles, including message processing, NATS integration, and PostgreSQL repository. Add configuration management using Koanf and structured logging with Zap. Remove legacy GraphQL integration and related files. Implement dependency injection with Google Wire.
This commit is contained in:
@@ -1,154 +0,0 @@
|
||||
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
|
||||
|
||||
package repository
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/Khan/genqlient/graphql"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// input type for inserting data into table "aviation.telegrams"
|
||||
type Aviation_telegrams_insert_input struct {
|
||||
Body_data json.RawMessage `json:"body_data"`
|
||||
Category string `json:"category"`
|
||||
Content string `json:"content"`
|
||||
Date_time string `json:"date_time"`
|
||||
Dispatched_at time.Time `json:"dispatched_at"`
|
||||
Message_id string `json:"message_id"`
|
||||
Need_dispatch bool `json:"need_dispatch"`
|
||||
Originator string `json:"originator"`
|
||||
Originator_date_time string `json:"originator_date_time"`
|
||||
Parsed_at time.Time `json:"parsed_at"`
|
||||
Primary_address string `json:"primary_address"`
|
||||
Priority_indicator string `json:"priority_indicator"`
|
||||
Received_at time.Time `json:"received_at"`
|
||||
Secondary_addresses string `json:"secondary_addresses"`
|
||||
Uuid uuid.UUID `json:"uuid"`
|
||||
}
|
||||
|
||||
// GetBody_data returns Aviation_telegrams_insert_input.Body_data, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetBody_data() json.RawMessage { return v.Body_data }
|
||||
|
||||
// GetCategory returns Aviation_telegrams_insert_input.Category, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetCategory() string { return v.Category }
|
||||
|
||||
// GetContent returns Aviation_telegrams_insert_input.Content, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetContent() string { return v.Content }
|
||||
|
||||
// GetDate_time returns Aviation_telegrams_insert_input.Date_time, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetDate_time() string { return v.Date_time }
|
||||
|
||||
// GetDispatched_at returns Aviation_telegrams_insert_input.Dispatched_at, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetDispatched_at() time.Time { return v.Dispatched_at }
|
||||
|
||||
// GetMessage_id returns Aviation_telegrams_insert_input.Message_id, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetMessage_id() string { return v.Message_id }
|
||||
|
||||
// GetNeed_dispatch returns Aviation_telegrams_insert_input.Need_dispatch, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetNeed_dispatch() bool { return v.Need_dispatch }
|
||||
|
||||
// GetOriginator returns Aviation_telegrams_insert_input.Originator, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetOriginator() string { return v.Originator }
|
||||
|
||||
// GetOriginator_date_time returns Aviation_telegrams_insert_input.Originator_date_time, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetOriginator_date_time() string {
|
||||
return v.Originator_date_time
|
||||
}
|
||||
|
||||
// GetParsed_at returns Aviation_telegrams_insert_input.Parsed_at, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetParsed_at() time.Time { return v.Parsed_at }
|
||||
|
||||
// GetPrimary_address returns Aviation_telegrams_insert_input.Primary_address, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetPrimary_address() string { return v.Primary_address }
|
||||
|
||||
// GetPriority_indicator returns Aviation_telegrams_insert_input.Priority_indicator, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetPriority_indicator() string { return v.Priority_indicator }
|
||||
|
||||
// GetReceived_at returns Aviation_telegrams_insert_input.Received_at, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetReceived_at() time.Time { return v.Received_at }
|
||||
|
||||
// GetSecondary_addresses returns Aviation_telegrams_insert_input.Secondary_addresses, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetSecondary_addresses() string {
|
||||
return v.Secondary_addresses
|
||||
}
|
||||
|
||||
// GetUuid returns Aviation_telegrams_insert_input.Uuid, and is useful for accessing the field via an interface.
|
||||
func (v *Aviation_telegrams_insert_input) GetUuid() uuid.UUID { return v.Uuid }
|
||||
|
||||
// __newMessageInput is used internally by genqlient
|
||||
type __newMessageInput struct {
|
||||
Object Aviation_telegrams_insert_input `json:"object"`
|
||||
}
|
||||
|
||||
// GetObject returns __newMessageInput.Object, and is useful for accessing the field via an interface.
|
||||
func (v *__newMessageInput) GetObject() Aviation_telegrams_insert_input { return v.Object }
|
||||
|
||||
// newMessageInsert_aviation_telegrams_oneAviation_telegrams includes the requested fields of the GraphQL type aviation_telegrams.
|
||||
// The GraphQL type's documentation follows.
|
||||
//
|
||||
// columns and relationships of "aviation.telegrams"
|
||||
type newMessageInsert_aviation_telegrams_oneAviation_telegrams struct {
|
||||
Message_id string `json:"message_id"`
|
||||
Uuid uuid.UUID `json:"uuid"`
|
||||
}
|
||||
|
||||
// GetMessage_id returns newMessageInsert_aviation_telegrams_oneAviation_telegrams.Message_id, and is useful for accessing the field via an interface.
|
||||
func (v *newMessageInsert_aviation_telegrams_oneAviation_telegrams) GetMessage_id() string {
|
||||
return v.Message_id
|
||||
}
|
||||
|
||||
// GetUuid returns newMessageInsert_aviation_telegrams_oneAviation_telegrams.Uuid, and is useful for accessing the field via an interface.
|
||||
func (v *newMessageInsert_aviation_telegrams_oneAviation_telegrams) GetUuid() uuid.UUID {
|
||||
return v.Uuid
|
||||
}
|
||||
|
||||
// newMessageResponse is returned by newMessage on success.
|
||||
type newMessageResponse struct {
|
||||
// insert a single row into the table: "aviation.telegrams"
|
||||
Insert_aviation_telegrams_one newMessageInsert_aviation_telegrams_oneAviation_telegrams `json:"insert_aviation_telegrams_one"`
|
||||
}
|
||||
|
||||
// GetInsert_aviation_telegrams_one returns newMessageResponse.Insert_aviation_telegrams_one, and is useful for accessing the field via an interface.
|
||||
func (v *newMessageResponse) GetInsert_aviation_telegrams_one() newMessageInsert_aviation_telegrams_oneAviation_telegrams {
|
||||
return v.Insert_aviation_telegrams_one
|
||||
}
|
||||
|
||||
// The query or mutation executed by newMessage.
|
||||
const newMessage_Operation = `
|
||||
mutation newMessage ($object: aviation_telegrams_insert_input!) {
|
||||
insert_aviation_telegrams_one(object: $object) {
|
||||
message_id
|
||||
uuid
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
func newMessage(
|
||||
ctx_ context.Context,
|
||||
client_ graphql.Client,
|
||||
object Aviation_telegrams_insert_input,
|
||||
) (*newMessageResponse, error) {
|
||||
req_ := &graphql.Request{
|
||||
OpName: "newMessage",
|
||||
Query: newMessage_Operation,
|
||||
Variables: &__newMessageInput{
|
||||
Object: object,
|
||||
},
|
||||
}
|
||||
var err_ error
|
||||
|
||||
var data_ newMessageResponse
|
||||
resp_ := &graphql.Response{Data: &data_}
|
||||
|
||||
err_ = client_.MakeRequest(
|
||||
ctx_,
|
||||
req_,
|
||||
resp_,
|
||||
)
|
||||
|
||||
return &data_, err_
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
# Default genqlient config; for full documentation see:
|
||||
# https://github.com/Khan/genqlient/blob/main/docs/genqlient.yaml
|
||||
schema: schema.graphql
|
||||
operations:
|
||||
- genqlient.graphql
|
||||
generated: generated.go
|
||||
bindings:
|
||||
jsonb:
|
||||
type: encoding/json.RawMessage
|
||||
timestamp:
|
||||
type: time.Time
|
||||
uuid:
|
||||
type: github.com/google/uuid.UUID
|
||||
@@ -1,64 +0,0 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"os"
|
||||
|
||||
"caatsm/internal/config"
|
||||
"caatsm/internal/domain"
|
||||
"caatsm/pkg/utils"
|
||||
|
||||
"github.com/Khan/genqlient/graphql"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
type HasuraRepository struct {
|
||||
client graphql.Client
|
||||
}
|
||||
|
||||
// New creates a new HasuraRepository
|
||||
func NewHasura(config *config.Config) *HasuraRepository {
|
||||
token := os.Getenv("GRAPHQL_TOKEN")
|
||||
if token == "" {
|
||||
token = config.Hasura.Secret
|
||||
}
|
||||
src := oauth2.StaticTokenSource(
|
||||
&oauth2.Token{AccessToken: token},
|
||||
)
|
||||
httpClient := oauth2.NewClient(context.Background(), src)
|
||||
return &HasuraRepository{
|
||||
client: graphql.NewClient(config.Hasura.Endpoint, httpClient),
|
||||
}
|
||||
}
|
||||
|
||||
// InsertParsedMessage inserts a new ParsedMessage into the Hasura GraphQL API
|
||||
func (hr *HasuraRepository) CreateNew(pm *domain.ParsedMessage) error {
|
||||
log := utils.GetSugaredLogger()
|
||||
bodyString, _ := json.Marshal(pm.BodyData)
|
||||
secondAddress, _ := json.Marshal(pm.SecondaryAddresses)
|
||||
var err error
|
||||
msgUuid := utils.GetUuid(pm.Uuid)
|
||||
variables := Aviation_telegrams_insert_input{
|
||||
Message_id: pm.MessageID,
|
||||
Priority_indicator: pm.PriorityIndicator,
|
||||
Primary_address: pm.PrimaryAddress,
|
||||
Secondary_addresses: string(secondAddress),
|
||||
Content: pm.Content,
|
||||
Body_data: bodyString,
|
||||
Category: pm.Category,
|
||||
Date_time: pm.DateTime,
|
||||
Dispatched_at: pm.DispatchedAt,
|
||||
Uuid: msgUuid,
|
||||
Received_at: pm.ReceivedAt,
|
||||
Originator: pm.Originator,
|
||||
Originator_date_time: pm.OriginatorDateTime,
|
||||
}
|
||||
resp, err := newMessage(context.Background(), hr.client, variables)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// fmt.Printf("Inserted new message: %v\n", resp)
|
||||
log.Infof("Saved : %v\n", resp)
|
||||
return nil
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
func TestConfig(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "Repositories Suite")
|
||||
}
|
||||
|
||||
var _ = Describe("Repositories", func() {
|
||||
// Context("Just a simple test", func() {
|
||||
|
||||
// // Define a struct for the mutation input to match the expected GraphQL input
|
||||
// // Define a struct for the mutation input to match the expected GraphQL input
|
||||
// type aviation_user_insert_input struct {
|
||||
// Name graphql.String `json:"name"`
|
||||
// Email graphql.String `json:"email"`
|
||||
// UpdateAt graphql.String `json:"update_at"` // Use string for timestamp
|
||||
// }
|
||||
// // Get the current time in RFC3339 format
|
||||
// currentTime := time.Now().Format(time.RFC3339)
|
||||
|
||||
// input := aviation_user_insert_input{
|
||||
// Name: graphql.String("new"),
|
||||
// Email: graphql.String("2@2.com"),
|
||||
// UpdateAt: graphql.String(currentTime), // Use formatted string
|
||||
// }
|
||||
|
||||
// // Define the mutation
|
||||
// var mutation struct {
|
||||
// InsertAviationUserOne struct {
|
||||
// ID int `json:"id"`
|
||||
// Name string
|
||||
// } `graphql:"insert_aviation_user_one(object: $object)"`
|
||||
// }
|
||||
|
||||
// // Define the mutation variables
|
||||
// // Define the mutation variables
|
||||
// variables := map[string]interface{}{
|
||||
// "object": input,
|
||||
// }
|
||||
// // Define the mutation
|
||||
|
||||
// client := graphql.NewClient("http://localhost:8080/v1/graphql", nil)
|
||||
|
||||
// err := client.Mutate(context.Background(), &mutation, variables)
|
||||
// It("should not error", func() {
|
||||
// Expect(err).NotTo(HaveOccurred())
|
||||
// })
|
||||
|
||||
// It("name should be new", func() {
|
||||
// Expect(mutation.InsertAviationUserOne.Name).To(Equal("new"))
|
||||
// })
|
||||
|
||||
// })
|
||||
|
||||
Context("Hasura Repository", func() {
|
||||
// var repository *HasuraRepository
|
||||
// var uuid = "uuid"
|
||||
// BeforeEach(func() {
|
||||
|
||||
// })
|
||||
// It("should mutate a parsed message", func() {
|
||||
// repository := NewHasuraRepo("http://localhost:8080/v1/graphql", "aviation-test")
|
||||
// parseMessage := &domain.ParsedMessage{
|
||||
// Uuid: uuid,
|
||||
// MessageID: "message_id",
|
||||
// DateTime: "date_time",
|
||||
// PriorityIndicator: "priority_indicator",
|
||||
// PrimaryAddress: "primary_address",
|
||||
// SecondaryAddresses: []string{"secondary_addresses"},
|
||||
// Originator: "originator",
|
||||
// OriginatorDateTime: "originator_date_time",
|
||||
// Category: "category",
|
||||
// BodyAndFooter: "body_and_footer",
|
||||
// BodyData: domain.ARR{AircraftID: "aircraft_id", Category: "ARR", DepartureAirport: "departure_airport", DepartureTime: "departure_time", ArrivalAirport: "arrival_airport", ArrivalTime: "arrival_time"},
|
||||
// ReceivedAt: time.Now(),
|
||||
// }
|
||||
// err := repository.InsertParsedMessage(parseMessage)
|
||||
// Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
// })
|
||||
})
|
||||
})
|
||||
@@ -1,785 +0,0 @@
|
||||
schema {
|
||||
query: query_root
|
||||
mutation: mutation_root
|
||||
subscription: subscription_root
|
||||
}
|
||||
|
||||
"""whether this query should be cached (Hasura Cloud only)"""
|
||||
directive @cached(
|
||||
"""measured in seconds"""
|
||||
ttl: Int! = 60
|
||||
|
||||
"""refresh the cache entry"""
|
||||
refresh: Boolean! = false
|
||||
) on QUERY
|
||||
|
||||
"""
|
||||
Boolean expression to compare columns of type "Boolean". All fields are combined with logical 'AND'.
|
||||
"""
|
||||
input Boolean_comparison_exp {
|
||||
_eq: Boolean
|
||||
_gt: Boolean
|
||||
_gte: Boolean
|
||||
_in: [Boolean!]
|
||||
_is_null: Boolean
|
||||
_lt: Boolean
|
||||
_lte: Boolean
|
||||
_neq: Boolean
|
||||
_nin: [Boolean!]
|
||||
}
|
||||
|
||||
"""
|
||||
Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'.
|
||||
"""
|
||||
input String_comparison_exp {
|
||||
_eq: String
|
||||
_gt: String
|
||||
_gte: String
|
||||
|
||||
"""does the column match the given case-insensitive pattern"""
|
||||
_ilike: String
|
||||
_in: [String!]
|
||||
|
||||
"""
|
||||
does the column match the given POSIX regular expression, case insensitive
|
||||
"""
|
||||
_iregex: String
|
||||
_is_null: Boolean
|
||||
|
||||
"""does the column match the given pattern"""
|
||||
_like: String
|
||||
_lt: String
|
||||
_lte: String
|
||||
_neq: String
|
||||
|
||||
"""does the column NOT match the given case-insensitive pattern"""
|
||||
_nilike: String
|
||||
_nin: [String!]
|
||||
|
||||
"""
|
||||
does the column NOT match the given POSIX regular expression, case insensitive
|
||||
"""
|
||||
_niregex: String
|
||||
|
||||
"""does the column NOT match the given pattern"""
|
||||
_nlike: String
|
||||
|
||||
"""
|
||||
does the column NOT match the given POSIX regular expression, case sensitive
|
||||
"""
|
||||
_nregex: String
|
||||
|
||||
"""does the column NOT match the given SQL regular expression"""
|
||||
_nsimilar: String
|
||||
|
||||
"""
|
||||
does the column match the given POSIX regular expression, case sensitive
|
||||
"""
|
||||
_regex: String
|
||||
|
||||
"""does the column match the given SQL regular expression"""
|
||||
_similar: String
|
||||
}
|
||||
|
||||
"""
|
||||
columns and relationships of "aviation.telegrams"
|
||||
"""
|
||||
type aviation_telegrams {
|
||||
body_data(
|
||||
"""JSON select path"""
|
||||
path: String
|
||||
): jsonb
|
||||
category: String
|
||||
content: String
|
||||
date_time: String
|
||||
dispatched_at: timestamp
|
||||
message_id: String
|
||||
need_dispatch: Boolean
|
||||
originator: String
|
||||
originator_date_time: String
|
||||
parsed_at: timestamp
|
||||
primary_address: String
|
||||
priority_indicator: String
|
||||
received_at: timestamp!
|
||||
secondary_addresses: String
|
||||
uuid: uuid!
|
||||
}
|
||||
|
||||
"""
|
||||
aggregated selection of "aviation.telegrams"
|
||||
"""
|
||||
type aviation_telegrams_aggregate {
|
||||
aggregate: aviation_telegrams_aggregate_fields
|
||||
nodes: [aviation_telegrams!]!
|
||||
}
|
||||
|
||||
"""
|
||||
aggregate fields of "aviation.telegrams"
|
||||
"""
|
||||
type aviation_telegrams_aggregate_fields {
|
||||
count(columns: [aviation_telegrams_select_column!], distinct: Boolean): Int!
|
||||
max: aviation_telegrams_max_fields
|
||||
min: aviation_telegrams_min_fields
|
||||
}
|
||||
|
||||
"""append existing jsonb value of filtered columns with new jsonb value"""
|
||||
input aviation_telegrams_append_input {
|
||||
body_data: jsonb
|
||||
}
|
||||
|
||||
"""
|
||||
Boolean expression to filter rows from the table "aviation.telegrams". All fields are combined with a logical 'AND'.
|
||||
"""
|
||||
input aviation_telegrams_bool_exp {
|
||||
_and: [aviation_telegrams_bool_exp!]
|
||||
_not: aviation_telegrams_bool_exp
|
||||
_or: [aviation_telegrams_bool_exp!]
|
||||
body_data: jsonb_comparison_exp
|
||||
category: String_comparison_exp
|
||||
content: String_comparison_exp
|
||||
date_time: String_comparison_exp
|
||||
dispatched_at: timestamp_comparison_exp
|
||||
message_id: String_comparison_exp
|
||||
need_dispatch: Boolean_comparison_exp
|
||||
originator: String_comparison_exp
|
||||
originator_date_time: String_comparison_exp
|
||||
parsed_at: timestamp_comparison_exp
|
||||
primary_address: String_comparison_exp
|
||||
priority_indicator: String_comparison_exp
|
||||
received_at: timestamp_comparison_exp
|
||||
secondary_addresses: String_comparison_exp
|
||||
uuid: uuid_comparison_exp
|
||||
}
|
||||
|
||||
"""
|
||||
unique or primary key constraints on table "aviation.telegrams"
|
||||
"""
|
||||
enum aviation_telegrams_constraint {
|
||||
"""
|
||||
unique or primary key constraint on columns "uuid"
|
||||
"""
|
||||
telegrams_pkey
|
||||
}
|
||||
|
||||
"""
|
||||
delete the field or element with specified path (for JSON arrays, negative integers count from the end)
|
||||
"""
|
||||
input aviation_telegrams_delete_at_path_input {
|
||||
body_data: [String!]
|
||||
}
|
||||
|
||||
"""
|
||||
delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array
|
||||
"""
|
||||
input aviation_telegrams_delete_elem_input {
|
||||
body_data: Int
|
||||
}
|
||||
|
||||
"""
|
||||
delete key/value pair or string element. key/value pairs are matched based on their key value
|
||||
"""
|
||||
input aviation_telegrams_delete_key_input {
|
||||
body_data: String
|
||||
}
|
||||
|
||||
"""
|
||||
input type for inserting data into table "aviation.telegrams"
|
||||
"""
|
||||
input aviation_telegrams_insert_input {
|
||||
body_data: jsonb
|
||||
category: String
|
||||
content: String
|
||||
date_time: String
|
||||
dispatched_at: timestamp
|
||||
message_id: String
|
||||
need_dispatch: Boolean
|
||||
originator: String
|
||||
originator_date_time: String
|
||||
parsed_at: timestamp
|
||||
primary_address: String
|
||||
priority_indicator: String
|
||||
received_at: timestamp
|
||||
secondary_addresses: String
|
||||
uuid: uuid
|
||||
}
|
||||
|
||||
"""aggregate max on columns"""
|
||||
type aviation_telegrams_max_fields {
|
||||
category: String
|
||||
content: String
|
||||
date_time: String
|
||||
dispatched_at: timestamp
|
||||
message_id: String
|
||||
originator: String
|
||||
originator_date_time: String
|
||||
parsed_at: timestamp
|
||||
primary_address: String
|
||||
priority_indicator: String
|
||||
received_at: timestamp
|
||||
secondary_addresses: String
|
||||
uuid: uuid
|
||||
}
|
||||
|
||||
"""aggregate min on columns"""
|
||||
type aviation_telegrams_min_fields {
|
||||
category: String
|
||||
content: String
|
||||
date_time: String
|
||||
dispatched_at: timestamp
|
||||
message_id: String
|
||||
originator: String
|
||||
originator_date_time: String
|
||||
parsed_at: timestamp
|
||||
primary_address: String
|
||||
priority_indicator: String
|
||||
received_at: timestamp
|
||||
secondary_addresses: String
|
||||
uuid: uuid
|
||||
}
|
||||
|
||||
"""
|
||||
response of any mutation on the table "aviation.telegrams"
|
||||
"""
|
||||
type aviation_telegrams_mutation_response {
|
||||
"""number of rows affected by the mutation"""
|
||||
affected_rows: Int!
|
||||
|
||||
"""data from the rows affected by the mutation"""
|
||||
returning: [aviation_telegrams!]!
|
||||
}
|
||||
|
||||
"""
|
||||
on_conflict condition type for table "aviation.telegrams"
|
||||
"""
|
||||
input aviation_telegrams_on_conflict {
|
||||
constraint: aviation_telegrams_constraint!
|
||||
update_columns: [aviation_telegrams_update_column!]! = []
|
||||
where: aviation_telegrams_bool_exp
|
||||
}
|
||||
|
||||
"""Ordering options when selecting data from "aviation.telegrams"."""
|
||||
input aviation_telegrams_order_by {
|
||||
body_data: order_by
|
||||
category: order_by
|
||||
content: order_by
|
||||
date_time: order_by
|
||||
dispatched_at: order_by
|
||||
message_id: order_by
|
||||
need_dispatch: order_by
|
||||
originator: order_by
|
||||
originator_date_time: order_by
|
||||
parsed_at: order_by
|
||||
primary_address: order_by
|
||||
priority_indicator: order_by
|
||||
received_at: order_by
|
||||
secondary_addresses: order_by
|
||||
uuid: order_by
|
||||
}
|
||||
|
||||
"""primary key columns input for table: aviation.telegrams"""
|
||||
input aviation_telegrams_pk_columns_input {
|
||||
uuid: uuid!
|
||||
}
|
||||
|
||||
"""prepend existing jsonb value of filtered columns with new jsonb value"""
|
||||
input aviation_telegrams_prepend_input {
|
||||
body_data: jsonb
|
||||
}
|
||||
|
||||
"""
|
||||
select columns of table "aviation.telegrams"
|
||||
"""
|
||||
enum aviation_telegrams_select_column {
|
||||
"""column name"""
|
||||
body_data
|
||||
|
||||
"""column name"""
|
||||
category
|
||||
|
||||
"""column name"""
|
||||
content
|
||||
|
||||
"""column name"""
|
||||
date_time
|
||||
|
||||
"""column name"""
|
||||
dispatched_at
|
||||
|
||||
"""column name"""
|
||||
message_id
|
||||
|
||||
"""column name"""
|
||||
need_dispatch
|
||||
|
||||
"""column name"""
|
||||
originator
|
||||
|
||||
"""column name"""
|
||||
originator_date_time
|
||||
|
||||
"""column name"""
|
||||
parsed_at
|
||||
|
||||
"""column name"""
|
||||
primary_address
|
||||
|
||||
"""column name"""
|
||||
priority_indicator
|
||||
|
||||
"""column name"""
|
||||
received_at
|
||||
|
||||
"""column name"""
|
||||
secondary_addresses
|
||||
|
||||
"""column name"""
|
||||
uuid
|
||||
}
|
||||
|
||||
"""
|
||||
input type for updating data in table "aviation.telegrams"
|
||||
"""
|
||||
input aviation_telegrams_set_input {
|
||||
body_data: jsonb
|
||||
category: String
|
||||
content: String
|
||||
date_time: String
|
||||
dispatched_at: timestamp
|
||||
message_id: String
|
||||
need_dispatch: Boolean
|
||||
originator: String
|
||||
originator_date_time: String
|
||||
parsed_at: timestamp
|
||||
primary_address: String
|
||||
priority_indicator: String
|
||||
received_at: timestamp
|
||||
secondary_addresses: String
|
||||
uuid: uuid
|
||||
}
|
||||
|
||||
"""
|
||||
Streaming cursor of the table "aviation_telegrams"
|
||||
"""
|
||||
input aviation_telegrams_stream_cursor_input {
|
||||
"""Stream column input with initial value"""
|
||||
initial_value: aviation_telegrams_stream_cursor_value_input!
|
||||
|
||||
"""cursor ordering"""
|
||||
ordering: cursor_ordering
|
||||
}
|
||||
|
||||
"""Initial value of the column from where the streaming should start"""
|
||||
input aviation_telegrams_stream_cursor_value_input {
|
||||
body_data: jsonb
|
||||
category: String
|
||||
content: String
|
||||
date_time: String
|
||||
dispatched_at: timestamp
|
||||
message_id: String
|
||||
need_dispatch: Boolean
|
||||
originator: String
|
||||
originator_date_time: String
|
||||
parsed_at: timestamp
|
||||
primary_address: String
|
||||
priority_indicator: String
|
||||
received_at: timestamp
|
||||
secondary_addresses: String
|
||||
uuid: uuid
|
||||
}
|
||||
|
||||
"""
|
||||
update columns of table "aviation.telegrams"
|
||||
"""
|
||||
enum aviation_telegrams_update_column {
|
||||
"""column name"""
|
||||
body_data
|
||||
|
||||
"""column name"""
|
||||
category
|
||||
|
||||
"""column name"""
|
||||
content
|
||||
|
||||
"""column name"""
|
||||
date_time
|
||||
|
||||
"""column name"""
|
||||
dispatched_at
|
||||
|
||||
"""column name"""
|
||||
message_id
|
||||
|
||||
"""column name"""
|
||||
need_dispatch
|
||||
|
||||
"""column name"""
|
||||
originator
|
||||
|
||||
"""column name"""
|
||||
originator_date_time
|
||||
|
||||
"""column name"""
|
||||
parsed_at
|
||||
|
||||
"""column name"""
|
||||
primary_address
|
||||
|
||||
"""column name"""
|
||||
priority_indicator
|
||||
|
||||
"""column name"""
|
||||
received_at
|
||||
|
||||
"""column name"""
|
||||
secondary_addresses
|
||||
|
||||
"""column name"""
|
||||
uuid
|
||||
}
|
||||
|
||||
input aviation_telegrams_updates {
|
||||
"""append existing jsonb value of filtered columns with new jsonb value"""
|
||||
_append: aviation_telegrams_append_input
|
||||
|
||||
"""
|
||||
delete the field or element with specified path (for JSON arrays, negative integers count from the end)
|
||||
"""
|
||||
_delete_at_path: aviation_telegrams_delete_at_path_input
|
||||
|
||||
"""
|
||||
delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array
|
||||
"""
|
||||
_delete_elem: aviation_telegrams_delete_elem_input
|
||||
|
||||
"""
|
||||
delete key/value pair or string element. key/value pairs are matched based on their key value
|
||||
"""
|
||||
_delete_key: aviation_telegrams_delete_key_input
|
||||
|
||||
"""prepend existing jsonb value of filtered columns with new jsonb value"""
|
||||
_prepend: aviation_telegrams_prepend_input
|
||||
|
||||
"""sets the columns of the filtered rows to the given values"""
|
||||
_set: aviation_telegrams_set_input
|
||||
|
||||
"""filter the rows which have to be updated"""
|
||||
where: aviation_telegrams_bool_exp!
|
||||
}
|
||||
|
||||
"""ordering argument of a cursor"""
|
||||
enum cursor_ordering {
|
||||
"""ascending ordering of the cursor"""
|
||||
ASC
|
||||
|
||||
"""descending ordering of the cursor"""
|
||||
DESC
|
||||
}
|
||||
|
||||
scalar jsonb
|
||||
|
||||
input jsonb_cast_exp {
|
||||
String: String_comparison_exp
|
||||
}
|
||||
|
||||
"""
|
||||
Boolean expression to compare columns of type "jsonb". All fields are combined with logical 'AND'.
|
||||
"""
|
||||
input jsonb_comparison_exp {
|
||||
_cast: jsonb_cast_exp
|
||||
|
||||
"""is the column contained in the given json value"""
|
||||
_contained_in: jsonb
|
||||
|
||||
"""does the column contain the given json value at the top level"""
|
||||
_contains: jsonb
|
||||
_eq: jsonb
|
||||
_gt: jsonb
|
||||
_gte: jsonb
|
||||
|
||||
"""does the string exist as a top-level key in the column"""
|
||||
_has_key: String
|
||||
|
||||
"""do all of these strings exist as top-level keys in the column"""
|
||||
_has_keys_all: [String!]
|
||||
|
||||
"""do any of these strings exist as top-level keys in the column"""
|
||||
_has_keys_any: [String!]
|
||||
_in: [jsonb!]
|
||||
_is_null: Boolean
|
||||
_lt: jsonb
|
||||
_lte: jsonb
|
||||
_neq: jsonb
|
||||
_nin: [jsonb!]
|
||||
}
|
||||
|
||||
"""mutation root"""
|
||||
type mutation_root {
|
||||
"""
|
||||
delete data from the table: "aviation.telegrams"
|
||||
"""
|
||||
delete_aviation_telegrams(
|
||||
"""filter the rows which have to be deleted"""
|
||||
where: aviation_telegrams_bool_exp!
|
||||
): aviation_telegrams_mutation_response
|
||||
|
||||
"""
|
||||
delete single row from the table: "aviation.telegrams"
|
||||
"""
|
||||
delete_aviation_telegrams_by_pk(uuid: uuid!): aviation_telegrams
|
||||
|
||||
"""
|
||||
insert data into the table: "aviation.telegrams"
|
||||
"""
|
||||
insert_aviation_telegrams(
|
||||
"""the rows to be inserted"""
|
||||
objects: [aviation_telegrams_insert_input!]!
|
||||
|
||||
"""upsert condition"""
|
||||
on_conflict: aviation_telegrams_on_conflict
|
||||
): aviation_telegrams_mutation_response
|
||||
|
||||
"""
|
||||
insert a single row into the table: "aviation.telegrams"
|
||||
"""
|
||||
insert_aviation_telegrams_one(
|
||||
"""the row to be inserted"""
|
||||
object: aviation_telegrams_insert_input!
|
||||
|
||||
"""upsert condition"""
|
||||
on_conflict: aviation_telegrams_on_conflict
|
||||
): aviation_telegrams
|
||||
|
||||
"""
|
||||
update data of the table: "aviation.telegrams"
|
||||
"""
|
||||
update_aviation_telegrams(
|
||||
"""append existing jsonb value of filtered columns with new jsonb value"""
|
||||
_append: aviation_telegrams_append_input
|
||||
|
||||
"""
|
||||
delete the field or element with specified path (for JSON arrays, negative integers count from the end)
|
||||
"""
|
||||
_delete_at_path: aviation_telegrams_delete_at_path_input
|
||||
|
||||
"""
|
||||
delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array
|
||||
"""
|
||||
_delete_elem: aviation_telegrams_delete_elem_input
|
||||
|
||||
"""
|
||||
delete key/value pair or string element. key/value pairs are matched based on their key value
|
||||
"""
|
||||
_delete_key: aviation_telegrams_delete_key_input
|
||||
|
||||
"""prepend existing jsonb value of filtered columns with new jsonb value"""
|
||||
_prepend: aviation_telegrams_prepend_input
|
||||
|
||||
"""sets the columns of the filtered rows to the given values"""
|
||||
_set: aviation_telegrams_set_input
|
||||
|
||||
"""filter the rows which have to be updated"""
|
||||
where: aviation_telegrams_bool_exp!
|
||||
): aviation_telegrams_mutation_response
|
||||
|
||||
"""
|
||||
update single row of the table: "aviation.telegrams"
|
||||
"""
|
||||
update_aviation_telegrams_by_pk(
|
||||
"""append existing jsonb value of filtered columns with new jsonb value"""
|
||||
_append: aviation_telegrams_append_input
|
||||
|
||||
"""
|
||||
delete the field or element with specified path (for JSON arrays, negative integers count from the end)
|
||||
"""
|
||||
_delete_at_path: aviation_telegrams_delete_at_path_input
|
||||
|
||||
"""
|
||||
delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array
|
||||
"""
|
||||
_delete_elem: aviation_telegrams_delete_elem_input
|
||||
|
||||
"""
|
||||
delete key/value pair or string element. key/value pairs are matched based on their key value
|
||||
"""
|
||||
_delete_key: aviation_telegrams_delete_key_input
|
||||
|
||||
"""prepend existing jsonb value of filtered columns with new jsonb value"""
|
||||
_prepend: aviation_telegrams_prepend_input
|
||||
|
||||
"""sets the columns of the filtered rows to the given values"""
|
||||
_set: aviation_telegrams_set_input
|
||||
pk_columns: aviation_telegrams_pk_columns_input!
|
||||
): aviation_telegrams
|
||||
|
||||
"""
|
||||
update multiples rows of table: "aviation.telegrams"
|
||||
"""
|
||||
update_aviation_telegrams_many(
|
||||
"""updates to execute, in order"""
|
||||
updates: [aviation_telegrams_updates!]!
|
||||
): [aviation_telegrams_mutation_response]
|
||||
}
|
||||
|
||||
"""column ordering options"""
|
||||
enum order_by {
|
||||
"""in ascending order, nulls last"""
|
||||
asc
|
||||
|
||||
"""in ascending order, nulls first"""
|
||||
asc_nulls_first
|
||||
|
||||
"""in ascending order, nulls last"""
|
||||
asc_nulls_last
|
||||
|
||||
"""in descending order, nulls first"""
|
||||
desc
|
||||
|
||||
"""in descending order, nulls first"""
|
||||
desc_nulls_first
|
||||
|
||||
"""in descending order, nulls last"""
|
||||
desc_nulls_last
|
||||
}
|
||||
|
||||
type query_root {
|
||||
"""
|
||||
fetch data from the table: "aviation.telegrams"
|
||||
"""
|
||||
aviation_telegrams(
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [aviation_telegrams_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [aviation_telegrams_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: aviation_telegrams_bool_exp
|
||||
): [aviation_telegrams!]!
|
||||
|
||||
"""
|
||||
fetch aggregated fields from the table: "aviation.telegrams"
|
||||
"""
|
||||
aviation_telegrams_aggregate(
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [aviation_telegrams_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [aviation_telegrams_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: aviation_telegrams_bool_exp
|
||||
): aviation_telegrams_aggregate!
|
||||
|
||||
"""
|
||||
fetch data from the table: "aviation.telegrams" using primary key columns
|
||||
"""
|
||||
aviation_telegrams_by_pk(uuid: uuid!): aviation_telegrams
|
||||
}
|
||||
|
||||
type subscription_root {
|
||||
"""
|
||||
fetch data from the table: "aviation.telegrams"
|
||||
"""
|
||||
aviation_telegrams(
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [aviation_telegrams_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [aviation_telegrams_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: aviation_telegrams_bool_exp
|
||||
): [aviation_telegrams!]!
|
||||
|
||||
"""
|
||||
fetch aggregated fields from the table: "aviation.telegrams"
|
||||
"""
|
||||
aviation_telegrams_aggregate(
|
||||
"""distinct select on columns"""
|
||||
distinct_on: [aviation_telegrams_select_column!]
|
||||
|
||||
"""limit the number of rows returned"""
|
||||
limit: Int
|
||||
|
||||
"""skip the first n rows. Use only with order_by"""
|
||||
offset: Int
|
||||
|
||||
"""sort the rows by one or more columns"""
|
||||
order_by: [aviation_telegrams_order_by!]
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: aviation_telegrams_bool_exp
|
||||
): aviation_telegrams_aggregate!
|
||||
|
||||
"""
|
||||
fetch data from the table: "aviation.telegrams" using primary key columns
|
||||
"""
|
||||
aviation_telegrams_by_pk(uuid: uuid!): aviation_telegrams
|
||||
|
||||
"""
|
||||
fetch data from the table in a streaming manner: "aviation.telegrams"
|
||||
"""
|
||||
aviation_telegrams_stream(
|
||||
"""maximum number of rows returned in a single batch"""
|
||||
batch_size: Int!
|
||||
|
||||
"""cursor to stream the results returned by the query"""
|
||||
cursor: [aviation_telegrams_stream_cursor_input]!
|
||||
|
||||
"""filter the rows returned"""
|
||||
where: aviation_telegrams_bool_exp
|
||||
): [aviation_telegrams!]!
|
||||
}
|
||||
|
||||
scalar timestamp
|
||||
|
||||
"""
|
||||
Boolean expression to compare columns of type "timestamp". All fields are combined with logical 'AND'.
|
||||
"""
|
||||
input timestamp_comparison_exp {
|
||||
_eq: timestamp
|
||||
_gt: timestamp
|
||||
_gte: timestamp
|
||||
_in: [timestamp!]
|
||||
_is_null: Boolean
|
||||
_lt: timestamp
|
||||
_lte: timestamp
|
||||
_neq: timestamp
|
||||
_nin: [timestamp!]
|
||||
}
|
||||
|
||||
scalar uuid
|
||||
|
||||
"""
|
||||
Boolean expression to compare columns of type "uuid". All fields are combined with logical 'AND'.
|
||||
"""
|
||||
input uuid_comparison_exp {
|
||||
_eq: uuid
|
||||
_gt: uuid
|
||||
_gte: uuid
|
||||
_in: [uuid!]
|
||||
_is_null: Boolean
|
||||
_lt: uuid
|
||||
_lte: uuid
|
||||
_neq: uuid
|
||||
_nin: [uuid!]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user