Documentation ¶
Index ¶
- func DecryptAES(key string, secure string) (decoded string, err error)
- func Encrypt(message string, key string) (encoded string, err error)
- func RemainOrDecrypt(data string, key string) (string, error)
- func RemainOrEncrypt(data string, key string) (string, error)
- type Account
- type AccountPlatform
- type AccountPublic
- type Assignment
- type AssignmentPublic
- type AssignmentRequest
- type BulkResponse
- type CheckCompromisedPasswordRequest
- type CreateTagRequest
- type GetTokenRequest
- type OAuthToken
- type Tag
- type TagPublic
- type TokenResponse
- type UpdateAccountRequest
- type UpdateAssignmentRequest
- type UpdateTagRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptAES ¶ added in v0.1.2
func RemainOrDecrypt ¶ added in v0.1.2
Types ¶
type Account ¶
func (*Account) ToAccountPublic ¶
func (a *Account) ToAccountPublic(displayName string, profileImage string) AccountPublic
type AccountPlatform ¶
type AccountPlatform struct {
Line string `json:"line"`
}
type AccountPublic ¶
type AccountPublic struct { Uid string `json:"uid"` DisplayName string `json:"displayName"` ProfileImage string `json:"profileImage"` Platform *AccountPlatform `json:"platform"` Consent bool `json:"consent"` }
type Assignment ¶
type Assignment struct { gorm.Model Name string Author string Description string ReminderTime string DueDate int TagID int Tag *Tag }
func (*Assignment) AfterFind ¶ added in v0.1.2
func (a *Assignment) AfterFind(tx *gorm.DB) (err error)
func (*Assignment) BeforeSave ¶ added in v0.1.2
func (a *Assignment) BeforeSave(tx *gorm.DB) (err error)
func (*Assignment) ToAssignmentPublic ¶
func (a *Assignment) ToAssignmentPublic() AssignmentPublic
type AssignmentPublic ¶
type AssignmentRequest ¶
type AssignmentRequest struct { Name string `json:"name" validate:"required"` Description string `json:"description"` DueDate int `json:"dueDate"` TagId string `json:"tagId"` ReminderTime []int `json:"reminderTime,omitempty" validate:"max=3,omitempty"` }
func (*AssignmentRequest) ToAssignment ¶
func (ar *AssignmentRequest) ToAssignment(author string) Assignment
type BulkResponse ¶
type CheckCompromisedPasswordRequest ¶
type CheckCompromisedPasswordRequest struct {
HashedPassword string `json:"hashedPassword"`
}
type CreateTagRequest ¶
type CreateTagRequest struct { Name string `json:"name" validate:"required"` Color string `json:"color"` ReminderTime []int `json:"reminderTime,omitempty" validate:"omitempty,max=3"` Subscriber []string `json:"subscriber"` }
func (*CreateTagRequest) ToTag ¶
func (ct *CreateTagRequest) ToTag(author string) Tag
type GetTokenRequest ¶ added in v0.2.0
type OAuthToken ¶ added in v0.2.0
type Tag ¶
type Tag struct { gorm.Model Name string Author string Color string ReminderTime string Subscriber string SecretKeyTotp string }
func (*Tag) ToTagPublic ¶
type TokenResponse ¶ added in v0.2.0
type TokenResponse struct {
Token string `json:"token"`
}
type UpdateAccountRequest ¶ added in v0.1.3
type UpdateAccountRequest struct {
Consent bool `json:"consent"`
}
type UpdateAssignmentRequest ¶
type UpdateAssignmentRequest struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` DueDate *int `json:"dueDate,omitempty"` TagId *string `json:"tagId,omitempty"` ReminderTime *[]int `json:"reminderTime,omitempty" validate:"max=3,omitempty"` }
func (*UpdateAssignmentRequest) UpdateAssignment ¶
func (ur *UpdateAssignmentRequest) UpdateAssignment(assignment *Assignment)
type UpdateTagRequest ¶
type UpdateTagRequest struct { Name *string `json:"name,omitempty"` Color *string `json:"color,omitempty"` ReminderTime *[]int `json:"reminderTime,omitempty" validate:"omitempty,max=3"` Subscriber *[]string `json:"subscribe"` }
func (*UpdateTagRequest) UpdateTag ¶
func (utr *UpdateTagRequest) UpdateTag(tag *Tag)
Click to show internal directories.
Click to hide internal directories.