Documentation
¶
Index ¶
- type Endpoints
- func (e Endpoints) CreateSnippet(snipp *types.Problem, userId string) error
- func (e *Endpoints) GetLatestSnippets() ([]types.Problem, error)
- func (e Endpoints) GetSnippet(id string) (*types.Problem, error)
- func (e *Endpoints) GetUser(token string) (*User, error)
- func (e *Endpoints) GithubAuth(code string) (*User, error)
- func (e *Endpoints) Query(q string, size int, private bool) ([]types.Problem, error)
- func (e Endpoints) UpdateSnippet(snipp *types.Problem, userId string) error
- func (e Endpoints) Worked(id, query string) error
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoints ¶
type Endpoints struct {
// contains filtered or unexported fields
}
Endpoints represents all endpoints of the http server
func NewEndpoints ¶
NewEndpoints is just below the http handlers
func (Endpoints) CreateSnippet ¶
CreateSnippet saves a snippet, generates id
func (*Endpoints) GetLatestSnippets ¶
GetLatestSnippets in reverse chronological order
func (Endpoints) GetSnippet ¶
GetSnippet by id
func (*Endpoints) GithubAuth ¶
GithubAuth exchanges a github code for a token, registers and returns a User
func (Endpoints) UpdateSnippet ¶
UpdateSnippet saves a snippet
Click to show internal directories.
Click to hide internal directories.