Documentation ¶
Index ¶
- type AnnouncedEvent
- type Channel
- type ChannelSpecifics
- type Identity
- type IdentityHandler
- type IdentityStore
- func (s *IdentityStore) GetIdentity(ctx context.Context, sub string) (*Identity, error)
- func (s *IdentityStore) InsertIdentity(ctx context.Context, identity Identity) (*Identity, error)
- func (s *IdentityStore) ReadAllIdentities() ([]Identity, error)
- func (s *IdentityStore) ReadIdentityByChatId(chatId string) (*Identity, error)
- func (s *IdentityStore) SaveDataToJsonFile() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnouncedEvent ¶
type Channel ¶
type Channel struct { ID string `json:"id"` ChannelName string `json:"channelname"` Type string `json:"type"` // "directmessage" or "group" Specifics ChannelSpecifics `json:"specifics"` }
type ChannelSpecifics ¶
type ChannelSpecifics struct {
ChatID string `json:"chatId"`
}
type IdentityHandler ¶
type IdentityHandler struct { Config *configuration.Config Store *IdentityStore }
func NewIdentityHandler ¶
func NewIdentityHandler(config *configuration.Config, store *IdentityStore) *IdentityHandler
func (*IdentityHandler) GetAllIdentities ¶
func (h *IdentityHandler) GetAllIdentities(w http.ResponseWriter, r *http.Request)
func (*IdentityHandler) GetIdentity ¶
func (h *IdentityHandler) GetIdentity(w http.ResponseWriter, r *http.Request)
func (*IdentityHandler) PostIdentity ¶
func (h *IdentityHandler) PostIdentity(w http.ResponseWriter, r *http.Request)
type IdentityStore ¶
type IdentityStore struct { Config *configuration.Config Identities []Identity }
func NewIdentityStore ¶
func NewIdentityStore(config *configuration.Config) (*IdentityStore, error)
func (*IdentityStore) GetIdentity ¶
func (*IdentityStore) InsertIdentity ¶
func (*IdentityStore) ReadAllIdentities ¶
func (s *IdentityStore) ReadAllIdentities() ([]Identity, error)
func (*IdentityStore) ReadIdentityByChatId ¶
func (s *IdentityStore) ReadIdentityByChatId(chatId string) (*Identity, error)
func (*IdentityStore) SaveDataToJsonFile ¶
func (s *IdentityStore) SaveDataToJsonFile() error
Click to show internal directories.
Click to hide internal directories.