Documentation
¶
Index ¶
- func AuthCodeURL(p string) string
- func Exchange(p string, c string) (*oauth2.Token, error)
- func NewEngine(r *redis.Client) error
- type Avatar
- type Board
- type BoardRequest
- type Card
- type CardRequest
- type Comment
- type CommentRequest
- type Credential
- type File
- type Label
- type LabelRequest
- type Milestone
- type MilestoneRequest
- type Namespace
- type Properties
- type ReceivedDataErr
- type Response
- type ResponseError
- type ResponseUser
- type Stage
- type Todo
- type TodoMetrics
- type UploadForm
- type User
- func CreateUser(u *User) (*User, error)
- func LoadByToken(u *User, provider string) (*User, error)
- func LoadUserByUsername(uname string) (*User, error)
- func UpdateUser(u *User) (*User, error)
- func UserOauthSignIn(provider string, tok *oauth2.Token) (*User, error)
- func UserSignIn(uname, pass string) (*User, error)
- func UserSignUp(uname, email, pass, token, provider string) (*User, error)
- type UserNotFound
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthCodeURL ¶
AuthCodeUrl return url for redirect user for oauth.
Types ¶
type Board ¶
type Board struct { Id int64 `json:"id"` Name string `json:"name"` NamespaceWithName string `json:"name_with_namespace"` PathWithNamespace string `json:"path_with_namespace"` Namespace *Namespace `json:"namespace,nil,omitempty"` Description string `json:"description"` LastModified string `json:"last_modified"` CreatedAt string `json:"created_at"` Owner *User `json:"owner,nil,omitempty"` AvatarUrl string `json:"avatar_url,nil,omitempty"` }
Board represents a kanban board.
type BoardRequest ¶
type BoardRequest struct {
BoardId string `json:"project_id"`
}
type Card ¶
type Card struct { Id int64 `json:"id"` Iid int64 `json:"iid"` Assignee *User `json:"assignee"` Milestone *Milestone `json:"milestone"` Author *User `json:"author"` Description string `json:"description"` Labels *[]string `json:"labels"` ProjectId int64 `json:"project_id"` BoardID string `json:"board_id"` PathWithNamespace string `json:"path_with_namespace"` Properties *Properties `json:"properties"` State string `json:"state"` Title string `json:"title"` Todo []*Todo `json:"todo"` TodoMetrics *TodoMetrics `json:"todo_metrics"` UserCommentsCount int `json:"user_comments_count"` Subscribed bool `json:"subscribed"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` DueDate string `json:"due_date"` Confidential bool `json:"confidential"` WebURL string `json:"web_url"` }
Card represents an card in kanban board
func (*Card) RoutingKey ¶
type CardRequest ¶
type CardRequest struct { CardId int64 `json:"issue_id"` ProjectId int64 `json:"project_id"` Title string `json:"title"` Description string `json:"description"` AssigneeId *int64 `json:"assignee_id"` MilestoneId *int64 `json:"milestone_id"` Labels string `json:"labels"` Properties *Properties `json:"properties"` Stage map[string]string `json:"stage"` Todo []*Todo `json:"todo"` DueDate string `json:"due_date"` Confidential bool `json:"confidential"` }
CardRequest represents a card request for create, update, delete card on kanban
type Comment ¶
type Comment struct { Id int64 `json:"id"` Author *User `json:"author"` Body string `json:"body"` CreatedAt time.Time `json:"created_at"` IsInfo bool `json:"is_info"` }
Comment represents a card comment
func (*Comment) MarshalJSON ¶
Marshal returns the JSON encoding of comment
type CommentRequest ¶
type CommentRequest struct { CardId int64 `json:"issue_id"` ProjectId int64 `json:"project_id"` Body string `json:"body"` }
CommentRequest represents a request for create or update comment on card
type Credential ¶
type File ¶
type File struct { Alt string `json:"alt"` URL string `json:"url"` Markdown string `json:"markdown"` }
File represents uploaded file
type Label ¶
type Label struct { ID int64 `json:"id"` Color string `json:"color"` Name string `json:"name"` Description string `json:"description"` OpenCardCount int `json:"open_card_count"` ClosedCardCount int `json:"closed_card_count"` OpenMergeRequestCount int `json:"open_merge_requests_count"` Subscribed bool `json:"subscribed"` Priority int `json:"priority"` }
Label represent label
type LabelRequest ¶
type LabelRequest struct { Name string `json:"name"` Color string `json:"color"` NewName string `json:"new_name"` }
LabelRequest represent request for update label
type Milestone ¶
type Milestone struct { ID int64 `json:"id"` IID int64 `json:"iid"` State string `json:"state,omitempty"` Title string `json:"title,omitempty"` DueDate string `json:"due_date,omitempty"` Description string `json:"description"` UpdatedAt string `json:"updated_at"` CreatedAt string `json:"created_at"` }
Milestone represents a kanban milestone
type MilestoneRequest ¶
type MilestoneRequest struct { MilestoneID int64 `json:"milestone_id"` ProjectID int64 `json:"project_id"` Title string `json:"title"` Description string `json:"description"` DueDate string `json:"due_date"` }
MilestoneRequest represents a milestone request for create, update, delete milestone on kanban
type Namespace ¶
type Namespace struct { Id int64 `json:"id"` Name string `json:"name,omitempty"` Avatar *Avatar `json:"avatar,nil,omitempty"` }
Board represents a namespace kanban board.
type Properties ¶
type Properties struct {
Andon string `json:"andon"`
}
Properties represents a card properties
type ReceivedDataErr ¶
ReceivedDataError represents get data from storage or other api
func (ReceivedDataErr) Error ¶
func (r ReceivedDataErr) Error() string
Error realised error type ReceivedDataErr interface
type ResponseError ¶
type ResponseUser ¶
type Stage ¶
Stage represent board stage
func ParseLabelToStage ¶
ParseLabelToStage transform label to stage
type TodoMetrics ¶
TodoMetrics represents metrics by todo for card
type UploadForm ¶
type UploadForm struct {
File *multipart.FileHeader `form:"file"`
}
UploadForm represents file uploaded
type User ¶
type User struct { Id int64 Name string IsAdmin bool Token *jwt.Token Credential map[string]*Credential AvatarUrl string State string Username string Passwd string Salt string Email string }
func LoadUserByUsername ¶
LoadUserByUsername is
func UserOauthSignIn ¶
UserOauthSignIn is
func UserSignUp ¶
UserSignUp is
func (*User) EncodePasswd ¶
func (u *User) EncodePasswd()
EncodePasswd encodes password to safe format.
func (*User) MarshalJSON ¶
MarshalJSON returns the JSON encoding value.
func (*User) SignedString ¶
SignedString returns user token for access
func (*User) ValidatePassword ¶
ValidatePassword checks if given password matches the one belongs to the user.
type UserNotFound ¶
type UserNotFound struct {
// contains filtered or unexported fields
}
func (*UserNotFound) Error ¶
func (e *UserNotFound) Error() string