From b9491679b234efff7fe7e0df6ea639045913ef48 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Sun, 28 Jul 2024 19:51:23 -0400 Subject: [PATCH] License, querier interface --- LICENSE | 2 +- pkg/gordio/database/querier.go | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 pkg/gordio/database/querier.go diff --git a/LICENSE b/LICENSE index 2be9c24..a136513 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2024 amigan. +Copyright (c) 2024 Daniel Ponte. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/pkg/gordio/database/querier.go b/pkg/gordio/database/querier.go new file mode 100644 index 0000000..3070403 --- /dev/null +++ b/pkg/gordio/database/querier.go @@ -0,0 +1,33 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.26.0 + +package database + +import ( + "context" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" +) + +type Querier interface { + AddCall(ctx context.Context, arg AddCallParams) (uuid.UUID, error) + CreateAPIKey(ctx context.Context, owner int, expires pgtype.Timestamp, disabled *bool) (ApiKey, error) + CreateUser(ctx context.Context, arg CreateUserParams) (User, error) + DeleteAPIKey(ctx context.Context, apiKey uuid.UUID) error + DeleteUser(ctx context.Context, username string) error + GetAPIKey(ctx context.Context, apiKey uuid.UUID) (ApiKey, error) + GetTalkgroupTags(ctx context.Context, talkgroupID int) ([]string, error) + GetTalkgroupsWithAllTags(ctx context.Context, tags []string) ([]GetTalkgroupsWithAllTagsRow, error) + GetTalkgroupsWithAnyTags(ctx context.Context, tags []string) ([]GetTalkgroupsWithAnyTagsRow, error) + GetUserByID(ctx context.Context, id int32) (User, error) + GetUserByUID(ctx context.Context, id int32) (User, error) + GetUserByUsername(ctx context.Context, username string) (User, error) + GetUsers(ctx context.Context) ([]User, error) + SetCallTranscript(ctx context.Context, iD uuid.UUID, transcript *string) error + SetTalkgroupTags(ctx context.Context, systemID int, talkgroupID int, tags []string) error + UpdatePassword(ctx context.Context, username string, password string) error +} + +var _ Querier = (*Queries)(nil)