Documentation
¶
Index ¶
- Constants
- Variables
- func GetMigrationDrivers(handle *sql.DB) (source.Driver, database.Driver, error)
- type Ordering
- type Service
- func (s *Service) BeginTxContext(ctx context.Context) (*sql.Tx, context.CancelFunc, error)
- func (s *Service) CheckDefaultLogbookExists() (bool, error)
- func (s *Service) CheckDefaultLogbookExistsWithContext(ctx context.Context) (bool, error)
- func (s *Service) Close() error
- func (s *Service) DeleteLogbookByID(id int64) error
- func (s *Service) DeleteLogbookByIDWithContext(ctx context.Context, id int64) error
- func (s *Service) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (s *Service) FetchAllLogbooks() ([]types.Logbook, error)
- func (s *Service) FetchAllLogbooksWithContext(ctx context.Context) ([]types.Logbook, error)
- func (s *Service) FetchContactedStationByCallsign(callsign string) (types.ContactedStation, error)
- func (s *Service) FetchContactedStationByCallsignWithContext(ctx context.Context, callsign string) (types.ContactedStation, error)
- func (s *Service) FetchCountryByCallsign(callsign string) (types.Country, error)
- func (s *Service) FetchCountryByCallsignWithContext(ctx context.Context, callsign string) (types.Country, error)
- func (s *Service) FetchCountryByName(name string) (types.Country, error)
- func (s *Service) FetchCountryByNameWithContext(ctx context.Context, name string) (types.Country, error)
- func (s *Service) FetchLogbookByID(id int64) (types.Logbook, error)
- func (s *Service) FetchLogbookByIDWithContext(ctx context.Context, id int64) (types.Logbook, error)
- func (s *Service) FetchPendingUploads() ([]types.QsoUpload, error)
- func (s *Service) FetchPendingUploadsWithContext(ctx context.Context) ([]types.QsoUpload, error)
- func (s *Service) FetchQsoById(id int64) (types.Qso, error)
- func (s *Service) FetchQsoByIdWithContext(ctx context.Context, id int64) (types.Qso, error)
- func (s *Service) FetchQsoCountByLogbookId(id int64) (int64, error)
- func (s *Service) FetchQsoCountByLogbookIdWithContext(ctx context.Context, id int64) (int64, error)
- func (s *Service) FetchQsoSliceByCallsign(callsign string) ([]types.ContactHistory, error)
- func (s *Service) FetchQsoSliceByCallsignWithContext(ctx context.Context, callsign string) ([]types.ContactHistory, error)
- func (s *Service) FetchQsoSliceByLogbookId(id int64) (types.QsoSlice, error)
- func (s *Service) FetchQsoSliceByLogbookIdWithContext(ctx context.Context, id int64) (types.QsoSlice, error)
- func (s *Service) FetchQsoSliceBySessionID(id int64) (types.QsoSlice, error)
- func (s *Service) FetchQsoSliceBySessionIDWithContext(ctx context.Context, id int64) (types.QsoSlice, error)
- func (s *Service) FetchQsoSliceNotForwardedWithContext(ctx context.Context) (types.QsoSlice, error)
- func (s *Service) FetchQsoSlicePaging(logbookId, pageNum, pageSize int64, ordering Ordering) (types.QsoSlice, error)
- func (s *Service) FetchQsoSlicePagingWithContext(ctx context.Context, logbookId, pageNum, pageSize int64, ordering Ordering) (types.QsoSlice, error)
- func (s *Service) GenerateSession() (int64, error)
- func (s *Service) GenerateSessionWithContext(ctx context.Context) (int64, error)
- func (s *Service) Initialize() error
- func (s *Service) InsertContactedStation(station types.ContactedStation) (int64, error)
- func (s *Service) InsertContactedStationWithContext(ctx context.Context, station types.ContactedStation) (int64, error)
- func (s *Service) InsertCountry(country types.Country) (int64, error)
- func (s *Service) InsertCountryWithContext(ctx context.Context, country types.Country) (int64, error)
- func (s *Service) InsertLogbook(logbook types.Logbook) (int64, error)
- func (s *Service) InsertLogbookWithContext(ctx context.Context, logbook types.Logbook) (int64, error)
- func (s *Service) InsertQso(qso types.Qso) (int64, error)
- func (s *Service) InsertQsoUpload(id int64, action action.Action, service upload.OnlineService) error
- func (s *Service) InsertQsoUploadWithContext(ctx context.Context, qsoId int64, action action.Action, ...) error
- func (s *Service) InsertQsoWithContext(ctx context.Context, qso types.Qso) (int64, error)
- func (s *Service) IsContestDuplicateByLogbookID(id int64, callsign, band string) (bool, error)
- func (s *Service) IsContestDuplicateByLogbookIDWithContext(ctx context.Context, id int64, callsign, band string) (bool, error)
- func (s *Service) LogStats(prefix string)
- func (s *Service) Migrate() error
- func (s *Service) Open() error
- func (s *Service) Ping() error
- func (s *Service) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func (s *Service) SoftDeleteSessionByID(id int64) error
- func (s *Service) SoftDeleteSessionByIDWithContext(ctx context.Context, id int64) error
- func (s *Service) UpdateContactedStation(station types.ContactedStation) error
- func (s *Service) UpdateContactedStationWithContext(ctx context.Context, station types.ContactedStation) error
- func (s *Service) UpdateCountry(country types.Country) error
- func (s *Service) UpdateCountryWithContext(ctx context.Context, country types.Country) error
- func (s *Service) UpdateQso(qso types.Qso) error
- func (s *Service) UpdateQsoUploadStatus(id int64, status status.Status, action action.Action, attempts int64, ...) error
- func (s *Service) UpdateQsoUploadStatusWithContext(ctx context.Context, id int64, status status.Status, action action.Action, ...) error
- func (s *Service) UpdateQsoWithContext(ctx context.Context, qso types.Qso) error
- func (s *Service) UpsertLogbook(logbook types.Logbook) error
- func (s *Service) UpsertLogbookWithContext(ctx context.Context, logbook types.Logbook) error
Constants ¶
View Source
const ServiceName = types.SqliteServiceName
View Source
const (
SqliteDriver = "sqlite"
)
Variables ¶
View Source
var OrderingNames = []struct { Value Ordering TSName string }{ {Value: Ascending, TSName: "ASC"}, {Value: Descending, TSName: "DESC"}, }
Functions ¶
Types ¶
type Service ¶
type Service struct {
ConfigService *config.Service `di.inject:"configservice"`
LoggerService *logging.Service `di.inject:"loggingservice"`
DatabaseConfig *types.DatastoreConfig
// contains filtered or unexported fields
}
func (*Service) BeginTxContext ¶
BeginTxContext starts a new transaction.
func (*Service) CheckDefaultLogbookExists ¶
func (*Service) CheckDefaultLogbookExistsWithContext ¶
func (*Service) DeleteLogbookByID ¶
func (*Service) DeleteLogbookByIDWithContext ¶
func (*Service) ExecContext ¶
func (*Service) FetchAllLogbooksWithContext ¶
func (*Service) FetchContactedStationByCallsign ¶
func (s *Service) FetchContactedStationByCallsign(callsign string) (types.ContactedStation, error)
func (*Service) FetchContactedStationByCallsignWithContext ¶
func (*Service) FetchCountryByCallsign ¶
func (*Service) FetchCountryByCallsignWithContext ¶
func (*Service) FetchCountryByName ¶
func (*Service) FetchCountryByNameWithContext ¶
func (*Service) FetchLogbookByID ¶
func (*Service) FetchLogbookByIDWithContext ¶
func (*Service) FetchPendingUploads ¶
func (*Service) FetchPendingUploadsWithContext ¶
func (*Service) FetchQsoByIdWithContext ¶
func (*Service) FetchQsoCountByLogbookId ¶
func (*Service) FetchQsoCountByLogbookIdWithContext ¶
func (*Service) FetchQsoSliceByCallsign ¶
func (s *Service) FetchQsoSliceByCallsign(callsign string) ([]types.ContactHistory, error)
func (*Service) FetchQsoSliceByCallsignWithContext ¶
func (*Service) FetchQsoSliceByLogbookId ¶
func (*Service) FetchQsoSliceByLogbookIdWithContext ¶
func (*Service) FetchQsoSliceBySessionID ¶
func (*Service) FetchQsoSliceBySessionIDWithContext ¶
func (*Service) FetchQsoSliceNotForwardedWithContext ¶
func (*Service) FetchQsoSlicePaging ¶
func (*Service) FetchQsoSlicePagingWithContext ¶
func (*Service) GenerateSession ¶
func (*Service) GenerateSessionWithContext ¶
func (*Service) Initialize ¶
Initialize initializes the database service. No constructor is provided as this service is to be initialized within an IOC/DI container.
func (*Service) InsertContactedStation ¶
func (s *Service) InsertContactedStation(station types.ContactedStation) (int64, error)
func (*Service) InsertContactedStationWithContext ¶
func (*Service) InsertCountry ¶
func (*Service) InsertCountryWithContext ¶
func (*Service) InsertLogbook ¶
func (*Service) InsertLogbookWithContext ¶
func (*Service) InsertQsoUpload ¶
func (*Service) InsertQsoUploadWithContext ¶
func (*Service) InsertQsoWithContext ¶
func (*Service) IsContestDuplicateByLogbookID ¶
func (*Service) IsContestDuplicateByLogbookIDWithContext ¶
func (*Service) QueryContext ¶
func (*Service) SoftDeleteSessionByID ¶
func (*Service) SoftDeleteSessionByIDWithContext ¶
func (*Service) UpdateContactedStation ¶
func (s *Service) UpdateContactedStation(station types.ContactedStation) error
func (*Service) UpdateContactedStationWithContext ¶
func (*Service) UpdateCountryWithContext ¶
func (*Service) UpdateQsoUploadStatus ¶
func (*Service) UpdateQsoUploadStatusWithContext ¶
func (*Service) UpdateQsoWithContext ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.