Documentation
¶
Index ¶
- type Buf
- type Category
- type CategoryPost
- type CheckID
- type Comment
- type DTO
- type FileMaker
- type FileSrc
- type Post
- type Ratio
- type Session
- type User
- func (u *User) Add(r *http.Request)
- func (u *User) AddJSON(data []byte) error
- func (u *User) Create() *object.QuerySettings
- func (u *User) CryptPassword() bool
- func (u *User) Delete() *object.QuerySettings
- func (u *User) MakeKeys(key string, data ...interface{})
- func (u *User) ValidEmail() bool
- func (u *User) ValidLogin() bool
- func (u *User) ValidPassword() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct {
Name string `json:"name"`
}
func (*Category) Create ¶
func (c *Category) Create() *object.QuerySettings
type CategoryPost ¶
type CategoryPost struct { Post int // current new created Category int // current id from slice Slice []string // from http response ID []int // checked for valid from http response }
func NewCategoryPost ¶
func NewCategoryPost() *CategoryPost
func (*CategoryPost) Create ¶
func (cp *CategoryPost) Create() *object.QuerySettings
func (*CategoryPost) Delete ¶
func (cp *CategoryPost) Delete() *object.QuerySettings
type CheckID ¶
type CheckID struct { Atoi bool // if true - must use IDString IDString string // will use if Atoi = true ID interface{} // will use if Atoi = false Who string }
func NewCheckID ¶
func NewCheckIDAtoi ¶
type Comment ¶
func NewComment ¶
func (*Comment) Create ¶
func (c *Comment) Create() *object.QuerySettings
func (*Comment) Delete ¶
func (c *Comment) Delete() *object.QuerySettings
type DTO ¶
type DTO interface { Create() *object.QuerySettings Delete() *object.QuerySettings }
type FileMaker ¶
func NewFileMaker ¶
func (*FileMaker) Create ¶
func (fm *FileMaker) Create() *object.QuerySettings
func (*FileMaker) Delete ¶
func (i *FileMaker) Delete() *object.QuerySettings
type Post ¶
type Post struct { Title string Body string Image *FileMaker Categories *CategoryPost Obj object.Obj }
func (*Post) Create ¶
func (p *Post) Create() *object.QuerySettings
func (*Post) Delete ¶
func (p *Post) Delete() *object.QuerySettings
type Ratio ¶
type Ratio struct { PostOrComm map[string]string // post or comment - map[post]id Ratio int // like/dislike Obj object.Obj }
func (*Ratio) Create ¶
func (r *Ratio) Create() *object.QuerySettings
Create prepares query for db and choose fields for adding incoming data
func (*Ratio) Delete ¶
func (r *Ratio) Delete() *object.QuerySettings
type Session ¶
func NewSession ¶
func (*Session) Create ¶
func (s *Session) Create() *object.QuerySettings
func (*Session) Delete ¶
func (s *Session) Delete() *object.QuerySettings
type User ¶
type User struct { IdSub any `json:"sub"` // for google id Id any `json:"id"` // (not exported) only for authentication from social network Login string `json:"login"` Name string `json:"name"` Password string RePassword string Email string `json:"email"` ReEmail string Created time.Time Obj object.Obj }
func (*User) Create ¶
func (u *User) Create() *object.QuerySettings
func (*User) CryptPassword ¶
func (*User) Delete ¶
func (u *User) Delete() *object.QuerySettings
func (*User) ValidEmail ¶
func (*User) ValidLogin ¶
func (*User) ValidPassword ¶
Click to show internal directories.
Click to hide internal directories.