Documentation
¶
Index ¶
- Constants
- func FormatTimestamp(raw string) string
- func ParseTimestamp(raw string) time.Time
- type DB
- func (db *DB) DeleteEmailSubscription(email string) error
- func (db *DB) GetAllCallCounters() (map[string]uint64, error)
- func (db *DB) GetAllEmails() ([]EmailEntry, error)
- func (db *DB) GetAllSourceCodes() ([]SourceCodeEntry, error)
- func (db *DB) IncrementCallCounter(endpoint string) (uint64, error)
- func (db *DB) SaveEmailSubscription(email string) error
- func (db *DB) SaveSourceCode(sourceCode string) error
- type EmailEntry
- type SourceCodeEntry
Constants ¶
View Source
const ( CallsBucket = "Calls" GetExecutionSteps = "GetExecutionSteps" FixCode = "FixCode" Compile = "Compile" Format = "Format" SourceCodeBucket = "SourceCode" EmailsBucket = "Emails" CodeKey = "code" UpdatedAtKey = "updated_at" EmailKey = "email" SubscribedAtKey = "subscribed_at" )
Variables ¶
This section is empty.
Functions ¶
func FormatTimestamp ¶
FormatTimestamp parses a stored timestamp and returns it in RFC822 format.
func ParseTimestamp ¶
ParseTimestamp parses timestamps stored in the DB. Handles both RFC822 (new format) and time.Now().String() (old format).
Types ¶
type DB ¶
func (*DB) DeleteEmailSubscription ¶
DeleteEmailSubscription removes an email subscription
func (*DB) GetAllCallCounters ¶
GetAllCallCounters returns all API call counters
func (*DB) GetAllEmails ¶
func (db *DB) GetAllEmails() ([]EmailEntry, error)
GetAllEmails returns all email subscriptions
func (*DB) GetAllSourceCodes ¶
func (db *DB) GetAllSourceCodes() ([]SourceCodeEntry, error)
GetAllSourceCodes returns all stored source codes
func (*DB) IncrementCallCounter ¶
IncrementCallCounter increments the counter for API calls
func (*DB) SaveEmailSubscription ¶
SaveEmailSubscription stores an email subscription
func (*DB) SaveSourceCode ¶
SaveSourceCode stores the source code with its hash as the key
type EmailEntry ¶
EmailEntry represents a stored email subscription
type SourceCodeEntry ¶
SourceCodeEntry represents a stored source code entry
Click to show internal directories.
Click to hide internal directories.