journalskill

package module
v0.0.0-...-038b785 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

My Journal Alexa Skill

This is the source code for my Alexa skill that allows you to maintain a personal journal. It's available as:

Documentation

Index

Constants

View Source
const (
	DayDate = iota
	MonthDate
	YearDate
	Invalid
)

Variables

This section is empty.

Functions

func ReadableStringFrom

func ReadableStringFrom(dateLike string, l Localizer) string

Types

type Config

type Config struct {
	BeSuccinct                     bool
	ShouldExplainAboutSuccinctMode bool
}

type ConfigService

type ConfigService interface {
	GetConfig(userID string) Config
	PersistConfig(userID string, config Config)
}

type DateType

type DateType int

func DateFrom

func DateFrom(dateString string) (dayDate date.Date, monthDate string, dateType DateType)

type ErrorInterpreter

type ErrorInterpreter interface {
	Interpret(error, Localizer) string
}

type ErrorReporter

type ErrorReporter interface {
	ReportPanic(e interface{}, requestEnv *alexa.RequestEnvelope)
	ReportError(e error)
}

type JournalProvider

type JournalProvider interface {
	Get(accessToken string, spreadsheetName string) (j.Journal, error)
}

type JournalSkill

type JournalSkill struct {
	// contains filtered or unexported fields
}

func NewJournalSkill

func NewJournalSkill(journalProvider JournalProvider,
	errorInterpreter ErrorInterpreter,
	log *zap.SugaredLogger,
	errorReporter ErrorReporter,
	i18nBundle *i18n.Bundle,
	configService ConfigService,
) *JournalSkill

func (*JournalSkill) ProcessRequest

func (h *JournalSkill) ProcessRequest(requestEnv *alexa.RequestEnvelope) (responseEnv *alexa.ResponseEnvelope)

type Localizer

type Localizer interface {
	Get(ids ...resources.StringID) string
	GetTemplated(id resources.StringID, templateData interface{}) string
	Month(m int) string
}

type SessionAttributes

type SessionAttributes struct {
	Drafts   map[string][]string `json:"drafts"`
	Drafting bool                `json:"drafting"`
}

Directories

Path Synopsis
cmd
skill command
Code generated by pegomock.
Code generated by pegomock.
search

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址