Versions in this module Expand all Collapse all v0 v0.2.2 Jan 7, 2021 v0.2.1 Jan 5, 2021 v0.2.0 Jan 5, 2021 v0.1.8 Jan 3, 2021 v0.1.7 Jan 3, 2021 v0.1.6 Jan 3, 2021 v0.1.5 Jan 2, 2021 v0.1.4 Jan 2, 2021 Changes in this version + var ReportError = func(ctx context.Context, err error, args ...interface{}) + var ReportPanic = func(err interface{}) v0.1.3 Dec 31, 2020 v0.1.2 Dec 21, 2020 v0.1.1 Dec 17, 2020 Changes in this version type DialService + SetDialMembershipValue func(ctx context.Context, dialID, value int) error v0.1.0 Dec 14, 2020 Changes in this version + const AuthSourceGitHub + const DialMembershipSortByUpdatedAtDesc + const ECONFLICT + const EINTERNAL + const EINVALID + const ENOTFOUND + const ENOTIMPLEMENTED + const EUNAUTHORIZED + const EventTypeDialMembershipValueChanged + const EventTypeDialValueChanged + const MaxDialNameLen + var Commit string + var Version string + func CanDeleteDialMembership(ctx context.Context, membership *DialMembership) bool + func CanEditDial(ctx context.Context, dial *Dial) bool + func CanEditDialMembership(ctx context.Context, membership *DialMembership) bool + func ErrorCode(err error) string + func ErrorMessage(err error) string + func FlashFromContext(ctx context.Context) string + func NewContextWithFlash(ctx context.Context, v string) context.Context + func NewContextWithUser(ctx context.Context, user *User) context.Context + func UserIDFromContext(ctx context.Context) int + type Auth struct + AccessToken string + CreatedAt time.Time + Expiry *time.Time + ID int + RefreshToken string + Source string + SourceID string + UpdatedAt time.Time + User *User + UserID int + func (a *Auth) AvatarURL(size int) string + func (a *Auth) Validate() error + type AuthFilter struct + ID *int + Limit int + Offset int + Source *string + SourceID *string + UserID *int + type AuthService interface + CreateAuth func(ctx context.Context, auth *Auth) error + DeleteAuth func(ctx context.Context, id int) error + FindAuthByID func(ctx context.Context, id int) (*Auth, error) + FindAuths func(ctx context.Context, filter AuthFilter) ([]*Auth, int, error) + type Dial struct + CreatedAt time.Time + ID int + InviteCode string + Memberships []*DialMembership + Name string + UpdatedAt time.Time + User *User + UserID int + Value int + func (d *Dial) MembershipByUserID(userID int) *DialMembership + func (d *Dial) Validate() error + type DialFilter struct + ID *int + InviteCode *string + Limit int + Offset int + type DialMembership struct + CreatedAt time.Time + Dial *Dial + DialID int + ID int + UpdatedAt time.Time + User *User + UserID int + Value int + func (m *DialMembership) Validate() error + type DialMembershipFilter struct + DialID *int + ID *int + Limit int + Offset int + SortBy string + UserID *int + type DialMembershipService interface + CreateDialMembership func(ctx context.Context, membership *DialMembership) error + DeleteDialMembership func(ctx context.Context, id int) error + FindDialMembershipByID func(ctx context.Context, id int) (*DialMembership, error) + FindDialMemberships func(ctx context.Context, filter DialMembershipFilter) ([]*DialMembership, int, error) + UpdateDialMembership func(ctx context.Context, id int, upd DialMembershipUpdate) (*DialMembership, error) + type DialMembershipUpdate struct + Value *int + type DialMembershipValueChangedPayload struct + ID int + Value int + type DialService interface + AverageDialValueReport func(ctx context.Context, start, end time.Time, interval time.Duration) (*DialValueReport, error) + CreateDial func(ctx context.Context, dial *Dial) error + DeleteDial func(ctx context.Context, id int) error + FindDialByID func(ctx context.Context, id int) (*Dial, error) + FindDials func(ctx context.Context, filter DialFilter) ([]*Dial, int, error) + UpdateDial func(ctx context.Context, id int, upd DialUpdate) (*Dial, error) + type DialUpdate struct + Name *string + type DialValueChangedPayload struct + ID int + Value int + type DialValueRecord struct + Timestamp time.Time + Value int + func (r *DialValueRecord) GoString() string + type DialValueReport struct + Records []*DialValueRecord + type Error struct + Code string + Message string + func Errorf(code string, format string, args ...interface{}) *Error + func (e *Error) Error() string + type Event struct + Payload interface{} + Type string + type EventService interface + PublishEvent func(userID int, event Event) + Subscribe func(ctx context.Context) (Subscription, error) + func NopEventService() EventService + type Subscription interface + C func() <-chan Event + Close func() error + type User struct + APIKey string + Auths []*Auth + CreatedAt time.Time + Email string + ID int + Name string + UpdatedAt time.Time + func UserFromContext(ctx context.Context) *User + func (u *User) AvatarURL(size int) string + func (u *User) Validate() error + type UserFilter struct + APIKey *string + Email *string + ID *int + Limit int + Offset int + type UserService interface + CreateUser func(ctx context.Context, user *User) error + DeleteUser func(ctx context.Context, id int) error + FindUserByID func(ctx context.Context, id int) (*User, error) + FindUsers func(ctx context.Context, filter UserFilter) ([]*User, int, error) + UpdateUser func(ctx context.Context, id int, upd UserUpdate) (*User, error) + type UserUpdate struct + Email *string + Name *string