Documentation ¶
Index ¶
- type Api
- func (api *Api) Add_to_group(group string, users ...*User) error
- func (api *Api) All_groups() map[string]int
- func (api *Api) Encode_sso_rsp(q url.Values) (payload, sig string)
- func (api *Api) Get_user(id int) (*User, error)
- func (api *Api) Get_user_by_email(email string) (*User, error)
- func (api *Api) Get_user_by_external_id(external_id int) (*User, error)
- func (api *Api) Message_user(title, message string, users ...*User)
- func (api *Api) Parse_sso_req(q url.Values) (payload url.Values)
- func (api *Api) Sync(external_id int, username, email, name string) (*User, error)
- type Message
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
func (*Api) All_groups ¶
Discourse groups as groups[name] == id
func (*Api) Get_user_by_external_id ¶
func (*Api) Message_user ¶
type Message ¶
type Message struct { Url string Title string Read bool Last_post time.Time First_post time.Time Reply_count int Poster_avatars map[string]string Last_poster string Original_poster string }
TODO: grab external_id from posters
type User ¶
type User struct { External_id int Id int Username string Admin bool Avatar_tmpl string Title string Groups map[string]int Bio string Website_url string Website_name string Location string Card_bg_url string Profile_bg_url string *Api }
func (*User) Add_to_group ¶
func (*User) Get_messages ¶
func (*User) Remove_from_group ¶
Click to show internal directories.
Click to hide internal directories.