Documentation ¶
Index ¶
- Constants
- func AddUser(u *User, c appengine.Context) (*datastore.Key, error)
- func CheckExist(u *User, c appengine.Context) (bool, error)
- func DefaultAdvertiserKey(c appengine.Context) *datastore.Key
- func DefaultUserKey(c appengine.Context) *datastore.Key
- func LoadAdvertiser(a *Advertiser, c appengine.Context) (*datastore.Key, error)
- func LoadExampleDataAtInit(c appengine.Context) error
- func ParseToken(token string) (*jwt.Token, error)
- type Advertiser
- type Token
- type User
Constants ¶
View Source
const ( Privatekey = `` /* 1674-byte string literal not displayed */ Tokenduration = 24 )
Variables ¶
This section is empty.
Functions ¶
func CheckExist ¶
CheckExist verifies that the user has not been created earlier
func DefaultUserKey ¶
Return the key for use the datastore
func LoadAdvertiser ¶
Load and save the data from the advertiser on the datastore
func LoadExampleDataAtInit ¶
This function only was need for load example data, for test the aplicacion
Types ¶
type Advertiser ¶
type Advertiser struct { Age int `json:"age"` Id string `json:"id"` Name string `json:"name"` Sex string `json:"sex"` Nse string `json:"nse"` Coverage string `json:"coverage"` Interets []string `json:"interests"` Category string `json:"category"` Budget int `json:"budget"` Objetives string `json:"objetives"` }
func GetAdvertisers ¶
func GetAdvertisers(c appengine.Context) ([]Advertiser, error)
Fetch all the advertisers data from the datastore
type Token ¶
func GenerateToken ¶
Create and return a object Token
Click to show internal directories.
Click to hide internal directories.