Documentation ¶
Overview ¶
Package model encapsulates account behavior.
Package model encapsulates backend behavior.
Package model encapsulates post behavior.
Package model encapsulates profile behavior.
Index ¶
- Variables
- func FromAccountToPayload(account *Account, rsp *pbAccount.AccountPayload) error
- func FromPayloadToAccount(rsp *pbAccount.AccountPayload, account *Account) error
- func FromPayloadToPost(rsp *pbPost.PostPayload, post *Post) error
- func FromPayloadToProfile(rsp *pbProfile.ProfilePayload, profile *Profile) error
- func FromPostToPayload(post *Post, rsp *pbPost.PostPayload) error
- func FromProfileToPayload(profile *Profile, rsp *pbProfile.ProfilePayload) error
- func GetSingletonBackend() *gorm.DB
- type Account
- type Model
- type Post
- type Profile
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Models ... // NOTE: order matters Models = []interface{}{ &Account{}, &Profile{}, &Post{}, } )
Functions ¶
func FromAccountToPayload ¶
func FromAccountToPayload(account *Account, rsp *pbAccount.AccountPayload) error
FromAccountToPayload ...
func FromPayloadToAccount ¶
func FromPayloadToAccount(rsp *pbAccount.AccountPayload, account *Account) error
FromPayloadToAccount ...
func FromPayloadToPost ¶
func FromPayloadToPost(rsp *pbPost.PostPayload, post *Post) error
FromPayloadToPost ...
func FromPayloadToProfile ¶
func FromPayloadToProfile(rsp *pbProfile.ProfilePayload, profile *Profile) error
FromPayloadToProfile ...
func FromPostToPayload ¶
func FromPostToPayload(post *Post, rsp *pbPost.PostPayload) error
FromPostToPayload ...
func FromProfileToPayload ¶
func FromProfileToPayload(profile *Profile, rsp *pbProfile.ProfilePayload) error
FromProfileToPayload ...
Types ¶
type Account ¶
type Account struct { gorm.Model Username string Password string ProfileID uint Profile Profile Posts []Post }
Account ...
Click to show internal directories.
Click to hide internal directories.