camel case

This commit is contained in:
Daniel Ponte 2025-02-07 09:24:42 -05:00
parent 1b2df3c6a3
commit d0d3f503b8
10 changed files with 116 additions and 115 deletions

View file

@ -68,18 +68,18 @@ type Call struct {
AudioType string `json:"audioType,omitempty" relayOut:"audioType,omitempty"` AudioType string `json:"audioType,omitempty" relayOut:"audioType,omitempty"`
AudioURL *string `json:"audioURL,omitempty" relayOut:"audioURL,omitempty"` AudioURL *string `json:"audioURL,omitempty" relayOut:"audioURL,omitempty"`
Duration CallDuration `json:"duration,omitempty" relayOut:"duration,omitempty"` Duration CallDuration `json:"duration,omitempty" relayOut:"duration,omitempty"`
DateTime time.Time `json:"call_date,omitempty" relayOut:"dateTime,omitempty"` DateTime time.Time `json:"callDate,omitempty" relayOut:"dateTime,omitempty"`
Frequencies []int `json:"frequencies,omitempty" relayOut:"frequencies,omitempty"` Frequencies []int `json:"frequencies,omitempty" relayOut:"frequencies,omitempty"`
Frequency int `json:"frequency,omitempty" relayOut:"frequency,omitempty"` Frequency int `json:"frequency,omitempty" relayOut:"frequency,omitempty"`
Patches []int `json:"patches,omitempty" relayOut:"patches,omitempty"` Patches []int `json:"patches,omitempty" relayOut:"patches,omitempty"`
Source int `json:"source,omitempty" relayOut:"source,omitempty"` Source int `json:"source,omitempty" relayOut:"source,omitempty"`
System int `json:"system_id,omitempty" relayOut:"system,omitempty"` System int `json:"systemId,omitempty" relayOut:"system,omitempty"`
Submitter *users.UserID `json:"submitter,omitempty" relayOut:"submitter,omitempty"` Submitter *users.UserID `json:"submitter,omitempty" relayOut:"submitter,omitempty"`
SystemLabel string `json:"system_name,omitempty" relayOut:"systemLabel,omitempty"` SystemLabel string `json:"systemName,omitempty" relayOut:"systemLabel,omitempty"`
Talkgroup int `json:"tgid,omitempty" relayOut:"talkgroup,omitempty"` Talkgroup int `json:"tgid,omitempty" relayOut:"talkgroup,omitempty"`
TalkgroupGroup *string `json:"talkgroupGroup,omitempty" relayOut:"talkgroupGroup,omitempty"` TalkgroupGroup *string `json:"talkgroupGroup,omitempty" relayOut:"talkgroupGroup,omitempty"`
TalkgroupLabel *string `json:"talkgroupLabel,omitempty" relayOut:"talkgroupLabel,omitempty"` TalkgroupLabel *string `json:"talkgroupLabel,omitempty" relayOut:"talkgroupLabel,omitempty"`
TGAlphaTag *string `json:"tg_name,omitempty" relayOut:"talkgroupTag,omitempty"` TGAlphaTag *string `json:"tgAlphaTag,omitempty" relayOut:"talkgroupTag,omitempty"`
Transcript *string `json:"transcript" relayOut:"transcript,omitempty"` Transcript *string `json:"transcript" relayOut:"transcript,omitempty"`
shouldStore bool `json:"-"` shouldStore bool `json:"-"`

View file

@ -57,7 +57,7 @@ type StoreTGVersionBatchResults struct {
type StoreTGVersionParams struct { type StoreTGVersionParams struct {
Submitter *int32 `json:"submitter"` Submitter *int32 `json:"submitter"`
SystemID int32 `json:"system_id"` SystemID int32 `json:"systemId"`
TGID int32 `json:"tgid"` TGID int32 `json:"tgid"`
} }
@ -135,16 +135,16 @@ type UpsertTalkgroupBatchResults struct {
} }
type UpsertTalkgroupParams struct { type UpsertTalkgroupParams struct {
SystemID int32 `json:"system_id"` SystemID int32 `json:"systemId"`
TGID int32 `json:"tgid"` TGID int32 `json:"tgid"`
Name *string `json:"name"` Name *string `json:"name"`
AlphaTag *string `json:"alpha_tag"` AlphaTag *string `json:"alphaTag"`
TGGroup *string `json:"tg_group"` TGGroup *string `json:"tgGroup"`
Frequency *int32 `json:"frequency"` Frequency *int32 `json:"frequency"`
Metadata jsontypes.Metadata `json:"metadata"` Metadata jsontypes.Metadata `json:"metadata"`
Tags []string `json:"tags"` Tags []string `json:"tags"`
Alert interface{} `json:"alert"` Alert interface{} `json:"alert"`
AlertRules rules.AlertRules `json:"alert_rules"` AlertRules rules.AlertRules `json:"alertRules"`
Weight pgtype.Numeric `json:"weight"` Weight pgtype.Numeric `json:"weight"`
Learned *bool `json:"learned"` Learned *bool `json:"learned"`
} }

View file

@ -30,10 +30,10 @@ VALUES
type AddAlertParams struct { type AddAlertParams struct {
Time pgtype.Timestamptz `json:"time"` Time pgtype.Timestamptz `json:"time"`
TGID int `json:"tgid"` TGID int `json:"tgid"`
SystemID int `json:"system_id"` SystemID int `json:"systemId"`
Weight *float32 `json:"weight"` Weight *float32 `json:"weight"`
Score *float32 `json:"score"` Score *float32 `json:"score"`
OrigScore *float32 `json:"orig_score"` OrigScore *float32 `json:"origScore"`
Notified bool `json:"notified"` Notified bool `json:"notified"`
Metadata []byte `json:"metadata"` Metadata []byte `json:"metadata"`
} }
@ -97,18 +97,18 @@ type AddCallParams struct {
Submitter *int32 `json:"submitter"` Submitter *int32 `json:"submitter"`
System int `json:"system"` System int `json:"system"`
Talkgroup int `json:"talkgroup"` Talkgroup int `json:"talkgroup"`
CallDate pgtype.Timestamptz `json:"call_date"` CallDate pgtype.Timestamptz `json:"callDate"`
AudioName *string `json:"audio_name"` AudioName *string `json:"audioName"`
AudioBlob []byte `json:"audio_blob"` AudioBlob []byte `json:"audioBlob"`
AudioType *string `json:"audio_type"` AudioType *string `json:"audioType"`
AudioUrl *string `json:"audio_url"` AudioUrl *string `json:"audioUrl"`
Duration *int32 `json:"duration"` Duration *int32 `json:"duration"`
Frequency int `json:"frequency"` Frequency int `json:"frequency"`
Frequencies []int `json:"frequencies"` Frequencies []int `json:"frequencies"`
Patches []int `json:"patches"` Patches []int `json:"patches"`
TGLabel *string `json:"tg_label"` TGLabel *string `json:"tgLabel"`
TGAlphaTag *string `json:"tg_alpha_tag"` TGAlphaTag *string `json:"tgAlphaTag"`
TGGroup *string `json:"tg_group"` TGGroup *string `json:"tgGroup"`
Source int `json:"source"` Source int `json:"source"`
} }
@ -192,17 +192,17 @@ type GetCallRow struct {
Submitter *int32 `json:"submitter"` Submitter *int32 `json:"submitter"`
System int `json:"system"` System int `json:"system"`
Talkgroup int `json:"talkgroup"` Talkgroup int `json:"talkgroup"`
CallDate pgtype.Timestamptz `json:"call_date"` CallDate pgtype.Timestamptz `json:"callDate"`
AudioName *string `json:"audio_name"` AudioName *string `json:"audioName"`
AudioType *string `json:"audio_type"` AudioType *string `json:"audioType"`
AudioUrl *string `json:"audio_url"` AudioUrl *string `json:"audioUrl"`
Duration *int32 `json:"duration"` Duration *int32 `json:"duration"`
Frequency int `json:"frequency"` Frequency int `json:"frequency"`
Frequencies []int `json:"frequencies"` Frequencies []int `json:"frequencies"`
Patches []int `json:"patches"` Patches []int `json:"patches"`
TGLabel *string `json:"tg_label"` TGLabel *string `json:"tgLabel"`
TGAlphaTag *string `json:"tg_alpha_tag"` TGAlphaTag *string `json:"tgAlphaTag"`
TGGroup *string `json:"tg_group"` TGGroup *string `json:"tgGroup"`
Source int `json:"source"` Source int `json:"source"`
Transcript *string `json:"transcript"` Transcript *string `json:"transcript"`
} }
@ -251,10 +251,10 @@ WHERE sc.id = $1
` `
type GetCallAudioByIDRow struct { type GetCallAudioByIDRow struct {
CallDate pgtype.Timestamptz `json:"call_date"` CallDate pgtype.Timestamptz `json:"callDate"`
AudioName *string `json:"audio_name"` AudioName *string `json:"audioName"`
AudioType *string `json:"audio_type"` AudioType *string `json:"audioType"`
AudioBlob []byte `json:"audio_blob"` AudioBlob []byte `json:"audioBlob"`
} }
func (q *Queries) GetCallAudioByID(ctx context.Context, id uuid.UUID) (GetCallAudioByIDRow, error) { func (q *Queries) GetCallAudioByID(ctx context.Context, id uuid.UUID) (GetCallAudioByIDRow, error) {
@ -318,10 +318,10 @@ CASE WHEN $4::TEXT[] IS NOT NULL THEN
type ListCallsCountParams struct { type ListCallsCountParams struct {
Start pgtype.Timestamptz `json:"start"` Start pgtype.Timestamptz `json:"start"`
End pgtype.Timestamptz `json:"end"` End pgtype.Timestamptz `json:"end"`
TagsAny []string `json:"tags_any"` TagsAny []string `json:"tagsAny"`
TagsNot []string `json:"tags_not"` TagsNot []string `json:"tagsNot"`
TGFilter *string `json:"tg_filter"` TGFilter *string `json:"tgFilter"`
LongerThan pgtype.Numeric `json:"longer_than"` LongerThan pgtype.Numeric `json:"longerThan"`
} }
func (q *Queries) ListCallsCount(ctx context.Context, arg ListCallsCountParams) (int64, error) { func (q *Queries) ListCallsCount(ctx context.Context, arg ListCallsCountParams) (int64, error) {
@ -378,20 +378,20 @@ FETCH NEXT $9 ROWS ONLY
type ListCallsPParams struct { type ListCallsPParams struct {
Start pgtype.Timestamptz `json:"start"` Start pgtype.Timestamptz `json:"start"`
End pgtype.Timestamptz `json:"end"` End pgtype.Timestamptz `json:"end"`
TagsAny []string `json:"tags_any"` TagsAny []string `json:"tagsAny"`
TagsNot []string `json:"tags_not"` TagsNot []string `json:"tagsNot"`
TGFilter *string `json:"tg_filter"` TGFilter *string `json:"tgFilter"`
LongerThan pgtype.Numeric `json:"longer_than"` LongerThan pgtype.Numeric `json:"longerThan"`
Direction string `json:"direction"` Direction string `json:"direction"`
Offset int32 `json:"offset"` Offset int32 `json:"offset"`
PerPage int32 `json:"per_page"` PerPage int32 `json:"perPage"`
} }
type ListCallsPRow struct { type ListCallsPRow struct {
ID uuid.UUID `json:"id"` ID uuid.UUID `json:"id"`
CallDate pgtype.Timestamptz `json:"call_date"` CallDate pgtype.Timestamptz `json:"callDate"`
Duration *int32 `json:"duration"` Duration *int32 `json:"duration"`
SystemID int `json:"system_id"` SystemID int `json:"systemId"`
TGID int `json:"tgid"` TGID int `json:"tgid"`
Incidents int64 `json:"incidents"` Incidents int64 `json:"incidents"`
} }

View file

@ -83,8 +83,8 @@ type CreateIncidentParams struct {
Name string `json:"name"` Name string `json:"name"`
Owner int `json:"owner"` Owner int `json:"owner"`
Description *string `json:"description"` Description *string `json:"description"`
StartTime pgtype.Timestamptz `json:"start_time"` StartTime pgtype.Timestamptz `json:"startTime"`
EndTime pgtype.Timestamptz `json:"end_time"` EndTime pgtype.Timestamptz `json:"endTime"`
Location []byte `json:"location"` Location []byte `json:"location"`
Metadata jsontypes.Metadata `json:"metadata"` Metadata jsontypes.Metadata `json:"metadata"`
} }
@ -206,16 +206,16 @@ ORDER BY ic.call_date ASC
` `
type GetIncidentCallsRow struct { type GetIncidentCallsRow struct {
CallID uuid.UUID `json:"call_id"` CallID uuid.UUID `json:"callId"`
CallDate pgtype.Timestamptz `json:"call_date"` CallDate pgtype.Timestamptz `json:"callDate"`
Duration *int32 `json:"duration"` Duration *int32 `json:"duration"`
SystemID int `json:"system_id"` SystemID int `json:"systemId"`
TGID int `json:"tgid"` TGID int `json:"tgid"`
Notes []byte `json:"notes"` Notes []byte `json:"notes"`
Submitter *int32 `json:"submitter"` Submitter *int32 `json:"submitter"`
AudioName *string `json:"audio_name"` AudioName *string `json:"audioName"`
AudioType *string `json:"audio_type"` AudioType *string `json:"audioType"`
AudioUrl *string `json:"audio_url"` AudioUrl *string `json:"audioUrl"`
Frequency int `json:"frequency"` Frequency int `json:"frequency"`
Frequencies []int `json:"frequencies"` Frequencies []int `json:"frequencies"`
Patches []int `json:"patches"` Patches []int `json:"patches"`
@ -327,7 +327,7 @@ type ListIncidentsPParams struct {
Filter *string `json:"filter"` Filter *string `json:"filter"`
Direction string `json:"direction"` Direction string `json:"direction"`
Offset int32 `json:"offset"` Offset int32 `json:"offset"`
PerPage int32 `json:"per_page"` PerPage int32 `json:"perPage"`
} }
type ListIncidentsPRow struct { type ListIncidentsPRow struct {
@ -335,11 +335,11 @@ type ListIncidentsPRow struct {
Name string `json:"name"` Name string `json:"name"`
Owner int `json:"owner"` Owner int `json:"owner"`
Description *string `json:"description"` Description *string `json:"description"`
StartTime pgtype.Timestamptz `json:"start_time"` StartTime pgtype.Timestamptz `json:"startTime"`
EndTime pgtype.Timestamptz `json:"end_time"` EndTime pgtype.Timestamptz `json:"endTime"`
Location []byte `json:"location"` Location []byte `json:"location"`
Metadata jsontypes.Metadata `json:"metadata"` Metadata jsontypes.Metadata `json:"metadata"`
CallsCount int64 `json:"calls_count"` CallsCount int64 `json:"callsCount"`
} }
func (q *Queries) ListIncidentsP(ctx context.Context, arg ListIncidentsPParams) ([]ListIncidentsPRow, error) { func (q *Queries) ListIncidentsP(ctx context.Context, arg ListIncidentsPParams) ([]ListIncidentsPRow, error) {
@ -417,8 +417,8 @@ RETURNING id, name, owner, description, start_time, end_time, location, metadata
type UpdateIncidentParams struct { type UpdateIncidentParams struct {
Name *string `json:"name"` Name *string `json:"name"`
Description *string `json:"description"` Description *string `json:"description"`
StartTime pgtype.Timestamptz `json:"start_time"` StartTime pgtype.Timestamptz `json:"startTime"`
EndTime pgtype.Timestamptz `json:"end_time"` EndTime pgtype.Timestamptz `json:"endTime"`
Location []byte `json:"location"` Location []byte `json:"location"`
Metadata jsontypes.Metadata `json:"metadata"` Metadata jsontypes.Metadata `json:"metadata"`
ID uuid.UUID `json:"id"` ID uuid.UUID `json:"id"`

View file

@ -17,10 +17,10 @@ type Alert struct {
ID int `json:"id,omitempty"` ID int `json:"id,omitempty"`
Time pgtype.Timestamptz `json:"time,omitempty"` Time pgtype.Timestamptz `json:"time,omitempty"`
TGID int `json:"tgid,omitempty"` TGID int `json:"tgid,omitempty"`
SystemID int `json:"system_id,omitempty"` SystemID int `json:"systemId,omitempty"`
Weight *float32 `json:"weight,omitempty"` Weight *float32 `json:"weight,omitempty"`
Score *float32 `json:"score,omitempty"` Score *float32 `json:"score,omitempty"`
OrigScore *float32 `json:"orig_score,omitempty"` OrigScore *float32 `json:"origScore,omitempty"`
Notified bool `json:"notified,omitempty"` Notified bool `json:"notified,omitempty"`
Metadata []byte `json:"metadata,omitempty"` Metadata []byte `json:"metadata,omitempty"`
} }
@ -28,10 +28,10 @@ type Alert struct {
type ApiKey struct { type ApiKey struct {
ID int `json:"id,omitempty"` ID int `json:"id,omitempty"`
Owner int `json:"owner,omitempty"` Owner int `json:"owner,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty"`
Expires pgtype.Timestamp `json:"expires,omitempty"` Expires pgtype.Timestamp `json:"expires,omitempty"`
Disabled *bool `json:"disabled,omitempty"` Disabled *bool `json:"disabled,omitempty"`
ApiKey string `json:"api_key,omitempty"` ApiKey string `json:"apiKey,omitempty"`
} }
type Call struct { type Call struct {
@ -39,18 +39,18 @@ type Call struct {
Submitter *int32 `json:"submitter,omitempty"` Submitter *int32 `json:"submitter,omitempty"`
System int `json:"system,omitempty"` System int `json:"system,omitempty"`
Talkgroup int `json:"talkgroup,omitempty"` Talkgroup int `json:"talkgroup,omitempty"`
CallDate pgtype.Timestamptz `json:"call_date,omitempty"` CallDate pgtype.Timestamptz `json:"callDate,omitempty"`
AudioName *string `json:"audio_name,omitempty"` AudioName *string `json:"audioName,omitempty"`
AudioBlob []byte `json:"audio_blob,omitempty"` AudioBlob []byte `json:"audioBlob,omitempty"`
Duration *int32 `json:"duration,omitempty"` Duration *int32 `json:"duration,omitempty"`
AudioType *string `json:"audio_type,omitempty"` AudioType *string `json:"audioType,omitempty"`
AudioUrl *string `json:"audio_url,omitempty"` AudioUrl *string `json:"audioUrl,omitempty"`
Frequency int `json:"frequency,omitempty"` Frequency int `json:"frequency,omitempty"`
Frequencies []int `json:"frequencies,omitempty"` Frequencies []int `json:"frequencies,omitempty"`
Patches []int `json:"patches,omitempty"` Patches []int `json:"patches,omitempty"`
TGLabel *string `json:"tg_label,omitempty"` TGLabel *string `json:"tgLabel,omitempty"`
TGAlphaTag *string `json:"tg_alpha_tag,omitempty"` TGAlphaTag *string `json:"tgAlphaTag,omitempty"`
TGGroup *string `json:"tg_group,omitempty"` TGGroup *string `json:"tgGroup,omitempty"`
Source int `json:"source,omitempty"` Source int `json:"source,omitempty"`
Transcript *string `json:"transcript,omitempty"` Transcript *string `json:"transcript,omitempty"`
} }
@ -60,32 +60,32 @@ type Incident struct {
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
Owner int `json:"owner,omitempty"` Owner int `json:"owner,omitempty"`
Description *string `json:"description,omitempty"` Description *string `json:"description,omitempty"`
StartTime pgtype.Timestamptz `json:"start_time,omitempty"` StartTime pgtype.Timestamptz `json:"startTime,omitempty"`
EndTime pgtype.Timestamptz `json:"end_time,omitempty"` EndTime pgtype.Timestamptz `json:"endTime,omitempty"`
Location []byte `json:"location,omitempty"` Location []byte `json:"location,omitempty"`
Metadata jsontypes.Metadata `json:"metadata,omitempty"` Metadata jsontypes.Metadata `json:"metadata,omitempty"`
} }
type IncidentsCall struct { type IncidentsCall struct {
IncidentID uuid.UUID `json:"incident_id,omitempty"` IncidentID uuid.UUID `json:"incidentId,omitempty"`
CallID uuid.UUID `json:"call_id,omitempty"` CallID uuid.UUID `json:"callId,omitempty"`
CallsTblID pgtype.UUID `json:"calls_tbl_id,omitempty"` CallsTblID pgtype.UUID `json:"callsTblId,omitempty"`
SweptCallID pgtype.UUID `json:"swept_call_id,omitempty"` SweptCallID pgtype.UUID `json:"sweptCallId,omitempty"`
CallDate pgtype.Timestamptz `json:"call_date,omitempty"` CallDate pgtype.Timestamptz `json:"callDate,omitempty"`
Notes []byte `json:"notes,omitempty"` Notes []byte `json:"notes,omitempty"`
} }
type Setting struct { type Setting struct {
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
UpdatedBy *int32 `json:"updated_by,omitempty"` UpdatedBy *int32 `json:"updatedBy,omitempty"`
Value []byte `json:"value,omitempty"` Value []byte `json:"value,omitempty"`
} }
type Share struct { type Share struct {
ID string `json:"id,omitempty"` ID string `json:"id,omitempty"`
EntityType string `json:"entity_type,omitempty"` EntityType string `json:"entityType,omitempty"`
EntityID uuid.UUID `json:"entity_id,omitempty"` EntityID uuid.UUID `json:"entityId,omitempty"`
EntityDate pgtype.Timestamptz `json:"entity_date,omitempty"` EntityDate pgtype.Timestamptz `json:"entityDate,omitempty"`
Owner int `json:"owner,omitempty"` Owner int `json:"owner,omitempty"`
Expiration pgtype.Timestamptz `json:"expiration,omitempty"` Expiration pgtype.Timestamptz `json:"expiration,omitempty"`
} }
@ -95,18 +95,18 @@ type SweptCall struct {
Submitter *int32 `json:"submitter,omitempty"` Submitter *int32 `json:"submitter,omitempty"`
System int `json:"system,omitempty"` System int `json:"system,omitempty"`
Talkgroup int `json:"talkgroup,omitempty"` Talkgroup int `json:"talkgroup,omitempty"`
CallDate pgtype.Timestamptz `json:"call_date,omitempty"` CallDate pgtype.Timestamptz `json:"callDate,omitempty"`
AudioName *string `json:"audio_name,omitempty"` AudioName *string `json:"audioName,omitempty"`
AudioBlob []byte `json:"audio_blob,omitempty"` AudioBlob []byte `json:"audioBlob,omitempty"`
Duration *int32 `json:"duration,omitempty"` Duration *int32 `json:"duration,omitempty"`
AudioType *string `json:"audio_type,omitempty"` AudioType *string `json:"audioType,omitempty"`
AudioUrl *string `json:"audio_url,omitempty"` AudioUrl *string `json:"audioUrl,omitempty"`
Frequency int `json:"frequency,omitempty"` Frequency int `json:"frequency,omitempty"`
Frequencies []int `json:"frequencies,omitempty"` Frequencies []int `json:"frequencies,omitempty"`
Patches []int `json:"patches,omitempty"` Patches []int `json:"patches,omitempty"`
TGLabel *string `json:"tg_label,omitempty"` TGLabel *string `json:"tgLabel,omitempty"`
TGAlphaTag *string `json:"tg_alpha_tag,omitempty"` TGAlphaTag *string `json:"tgAlphaTag,omitempty"`
TGGroup *string `json:"tg_group,omitempty"` TGGroup *string `json:"tgGroup,omitempty"`
Source int `json:"source,omitempty"` Source int `json:"source,omitempty"`
Transcript *string `json:"transcript,omitempty"` Transcript *string `json:"transcript,omitempty"`
} }
@ -118,16 +118,16 @@ type System struct {
type Talkgroup struct { type Talkgroup struct {
ID int `json:"id,omitempty"` ID int `json:"id,omitempty"`
SystemID int32 `json:"system_id,omitempty"` SystemID int32 `json:"systemId,omitempty"`
TGID int32 `json:"tgid,omitempty"` TGID int32 `json:"tgid,omitempty"`
Name *string `json:"name,omitempty"` Name *string `json:"name,omitempty"`
AlphaTag *string `json:"alpha_tag,omitempty"` AlphaTag *string `json:"alphaTag,omitempty"`
TGGroup *string `json:"tg_group,omitempty"` TGGroup *string `json:"tgGroup,omitempty"`
Frequency *int32 `json:"frequency,omitempty"` Frequency *int32 `json:"frequency,omitempty"`
Metadata jsontypes.Metadata `json:"metadata,omitempty"` Metadata jsontypes.Metadata `json:"metadata,omitempty"`
Tags []string `json:"tags,omitempty"` Tags []string `json:"tags,omitempty"`
Alert bool `json:"alert,omitempty"` Alert bool `json:"alert,omitempty"`
AlertRules rules.AlertRules `json:"alert_rules,omitempty"` AlertRules rules.AlertRules `json:"alertRules,omitempty"`
Weight float32 `json:"weight,omitempty"` Weight float32 `json:"weight,omitempty"`
Learned bool `json:"learned,omitempty"` Learned bool `json:"learned,omitempty"`
Ignored bool `json:"ignored,omitempty"` Ignored bool `json:"ignored,omitempty"`
@ -136,18 +136,18 @@ type Talkgroup struct {
type TalkgroupVersion struct { type TalkgroupVersion struct {
ID int `json:"id,omitempty"` ID int `json:"id,omitempty"`
Time pgtype.Timestamptz `json:"time,omitempty"` Time pgtype.Timestamptz `json:"time,omitempty"`
CreatedBy *int32 `json:"created_by,omitempty"` CreatedBy *int32 `json:"createdBy,omitempty"`
Deleted *bool `json:"deleted,omitempty"` Deleted *bool `json:"deleted,omitempty"`
SystemID *int32 `json:"system_id,omitempty"` SystemID *int32 `json:"systemId,omitempty"`
TGID *int32 `json:"tgid,omitempty"` TGID *int32 `json:"tgid,omitempty"`
Name *string `json:"name,omitempty"` Name *string `json:"name,omitempty"`
AlphaTag *string `json:"alpha_tag,omitempty"` AlphaTag *string `json:"alphaTag,omitempty"`
TGGroup *string `json:"tg_group,omitempty"` TGGroup *string `json:"tgGroup,omitempty"`
Frequency *int32 `json:"frequency,omitempty"` Frequency *int32 `json:"frequency,omitempty"`
Metadata []byte `json:"metadata,omitempty"` Metadata []byte `json:"metadata,omitempty"`
Tags []string `json:"tags,omitempty"` Tags []string `json:"tags,omitempty"`
Alert *bool `json:"alert,omitempty"` Alert *bool `json:"alert,omitempty"`
AlertRules []byte `json:"alert_rules,omitempty"` AlertRules []byte `json:"alertRules,omitempty"`
Weight *float32 `json:"weight,omitempty"` Weight *float32 `json:"weight,omitempty"`
Learned *bool `json:"learned,omitempty"` Learned *bool `json:"learned,omitempty"`
Ignored *bool `json:"ignored,omitempty"` Ignored *bool `json:"ignored,omitempty"`
@ -158,6 +158,6 @@ type User struct {
Username string `json:"username,omitempty"` Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"` Password string `json:"password,omitempty"`
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
IsAdmin bool `json:"is_admin,omitempty"` IsAdmin bool `json:"isAdmin,omitempty"`
Prefs []byte `json:"prefs,omitempty"` Prefs []byte `json:"prefs,omitempty"`
} }

View file

@ -25,9 +25,9 @@ INSERT INTO shares (
type CreateShareParams struct { type CreateShareParams struct {
ID string `json:"id"` ID string `json:"id"`
EntityType string `json:"entity_type"` EntityType string `json:"entityType"`
EntityID uuid.UUID `json:"entity_id"` EntityID uuid.UUID `json:"entityId"`
EntityDate pgtype.Timestamptz `json:"entity_date"` EntityDate pgtype.Timestamptz `json:"entityDate"`
Owner int `json:"owner"` Owner int `json:"owner"`
Expiration pgtype.Timestamptz `json:"expiration"` Expiration pgtype.Timestamptz `json:"expiration"`
} }

View file

@ -32,11 +32,11 @@ INSERT INTO talkgroups(
` `
type AddLearnedTalkgroupParams struct { type AddLearnedTalkgroupParams struct {
SystemID int32 `json:"system_id"` SystemID int32 `json:"systemId"`
TGID int32 `json:"tgid"` TGID int32 `json:"tgid"`
Name *string `json:"name"` Name *string `json:"name"`
AlphaTag *string `json:"alpha_tag"` AlphaTag *string `json:"alphaTag"`
TGGroup *string `json:"tg_group"` TGGroup *string `json:"tgGroup"`
} }
func (q *Queries) AddLearnedTalkgroup(ctx context.Context, arg AddLearnedTalkgroupParams) (Talkgroup, error) { func (q *Queries) AddLearnedTalkgroup(ctx context.Context, arg AddLearnedTalkgroupParams) (Talkgroup, error) {
@ -202,7 +202,7 @@ AND NOT (tags @> ARRAY[$3])
` `
type GetTalkgroupIDsByTagsRow struct { type GetTalkgroupIDsByTagsRow struct {
SystemID int32 `json:"system_id"` SystemID int32 `json:"systemId"`
TGID int32 `json:"tgid"` TGID int32 `json:"tgid"`
} }
@ -511,9 +511,9 @@ FETCH NEXT $5 ROWS ONLY
type GetTalkgroupsWithLearnedBySystemPParams struct { type GetTalkgroupsWithLearnedBySystemPParams struct {
System int32 `json:"system"` System int32 `json:"system"`
Filter *string `json:"filter"` Filter *string `json:"filter"`
OrderBy string `json:"order_by"` OrderBy string `json:"orderBy"`
Offset int32 `json:"offset"` Offset int32 `json:"offset"`
PerPage int32 `json:"per_page"` PerPage int32 `json:"perPage"`
} }
type GetTalkgroupsWithLearnedBySystemPRow struct { type GetTalkgroupsWithLearnedBySystemPRow struct {
@ -611,9 +611,9 @@ FETCH NEXT $4 ROWS ONLY
type GetTalkgroupsWithLearnedPParams struct { type GetTalkgroupsWithLearnedPParams struct {
Filter *string `json:"filter"` Filter *string `json:"filter"`
OrderBy string `json:"order_by"` OrderBy string `json:"orderBy"`
Offset int32 `json:"offset"` Offset int32 `json:"offset"`
PerPage int32 `json:"per_page"` PerPage int32 `json:"perPage"`
} }
type GetTalkgroupsWithLearnedPRow struct { type GetTalkgroupsWithLearnedPRow struct {
@ -774,17 +774,17 @@ RETURNING id, system_id, tgid, name, alpha_tag, tg_group, frequency, metadata, t
type UpdateTalkgroupParams struct { type UpdateTalkgroupParams struct {
Name *string `json:"name"` Name *string `json:"name"`
AlphaTag *string `json:"alpha_tag"` AlphaTag *string `json:"alphaTag"`
TGGroup *string `json:"tg_group"` TGGroup *string `json:"tgGroup"`
Frequency *int32 `json:"frequency"` Frequency *int32 `json:"frequency"`
Metadata jsontypes.Metadata `json:"metadata"` Metadata jsontypes.Metadata `json:"metadata"`
Tags []string `json:"tags"` Tags []string `json:"tags"`
Alert *bool `json:"alert"` Alert *bool `json:"alert"`
AlertRules rules.AlertRules `json:"alert_rules"` AlertRules rules.AlertRules `json:"alertRules"`
Weight *float32 `json:"weight"` Weight *float32 `json:"weight"`
Learned *bool `json:"learned"` Learned *bool `json:"learned"`
ID *int32 `json:"id"` ID *int32 `json:"id"`
SystemID *int32 `json:"system_id"` SystemID *int32 `json:"systemId"`
TGID *int32 `json:"tgid"` TGID *int32 `json:"tgid"`
} }

View file

@ -51,7 +51,7 @@ type CreateUserParams struct {
Username string `json:"username"` Username string `json:"username"`
Password string `json:"password"` Password string `json:"password"`
Email string `json:"email"` Email string `json:"email"`
IsAdmin bool `json:"is_admin"` IsAdmin bool `json:"isAdmin"`
} }
func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) { func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) {
@ -108,10 +108,10 @@ WHERE api_key = $1
type GetAPIKeyRow struct { type GetAPIKeyRow struct {
ID int `json:"id"` ID int `json:"id"`
Owner int `json:"owner"` Owner int `json:"owner"`
CreatedAt time.Time `json:"created_at"` CreatedAt time.Time `json:"createdAt"`
Expires pgtype.Timestamp `json:"expires"` Expires pgtype.Timestamp `json:"expires"`
Disabled *bool `json:"disabled"` Disabled *bool `json:"disabled"`
ApiKey string `json:"api_key"` ApiKey string `json:"apiKey"`
Username string `json:"username"` Username string `json:"username"`
} }

File diff suppressed because one or more lines are too long

View file

@ -11,6 +11,7 @@ sql:
query_parameter_limit: 3 query_parameter_limit: 3
emit_json_tags: true emit_json_tags: true
emit_interface: true emit_interface: true
json_tags_case_style: camel
initialisms: initialisms:
- id - id
- tgid - tgid