Documentation
¶
Index ¶
- Variables
- type Profiles
- func (p *Profiles) DeleteLanguages(w http.ResponseWriter, r *http.Request)
- func (p *Profiles) DeleteProfile(w http.ResponseWriter, r *http.Request)
- func (p *Profiles) DeleteSkills(w http.ResponseWriter, r *http.Request)
- func (p *Profiles) GetLanguageList(w http.ResponseWriter, r *http.Request)
- func (p *Profiles) GetProfile(w http.ResponseWriter, r *http.Request)
- func (p *Profiles) GetSkillList(w http.ResponseWriter, r *http.Request)
- func (p *Profiles) MiddleWareValidateProfile(next http.Handler) http.Handler
- func (p *Profiles) PatchLanguages(w http.ResponseWriter, r *http.Request)
- func (p *Profiles) PatchSkills(w http.ResponseWriter, r *http.Request)
- func (p *Profiles) PostProfile(w http.ResponseWriter, r *http.Request)
- func (p *Profiles) SearchProfile(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidProfilePath = fmt.Errorf("invalid path, path should be /profile/[username]")
ErrInvalidProductPath is an error message when the product path is not valid.
Functions ¶
This section is empty.
Types ¶
type Profiles ¶
type Profiles struct { Pd *data.ProfileData // contains filtered or unexported fields }
Interface for profiles handlers.
func NewProfiles ¶
func NewProfiles(log *logrus.Logger, pd *data.ProfileData) *Profiles
NewProfiles returns initialized Profiles handler struct.
func (*Profiles) DeleteLanguages ¶
func (p *Profiles) DeleteLanguages(w http.ResponseWriter, r *http.Request)
func (*Profiles) DeleteProfile ¶
func (p *Profiles) DeleteProfile(w http.ResponseWriter, r *http.Request)
DeleteProfile deletes a users profile from database.
func (*Profiles) DeleteSkills ¶
func (p *Profiles) DeleteSkills(w http.ResponseWriter, r *http.Request)
DeleteSkills deletes selected skills from a profile.
func (*Profiles) GetLanguageList ¶
func (p *Profiles) GetLanguageList(w http.ResponseWriter, r *http.Request)
func (*Profiles) GetProfile ¶
func (p *Profiles) GetProfile(w http.ResponseWriter, r *http.Request)
GetProfile returns profile provided username.
func (*Profiles) GetSkillList ¶
func (p *Profiles) GetSkillList(w http.ResponseWriter, r *http.Request)
func (*Profiles) MiddleWareValidateProfile ¶
DEPRECATED Validates incoming request json body for profiles struct
func (*Profiles) PatchLanguages ¶
func (p *Profiles) PatchLanguages(w http.ResponseWriter, r *http.Request)
PatchSkills insert a set of skills into a profile, does not replace, only appends.
func (*Profiles) PatchSkills ¶
func (p *Profiles) PatchSkills(w http.ResponseWriter, r *http.Request)
PatchSkills insert a set of skills into a profile, does not replace, only appends.
func (*Profiles) PostProfile ¶
func (p *Profiles) PostProfile(w http.ResponseWriter, r *http.Request)
PostProfile creates a profile entry in the database, should not be exposed only for testing.
func (*Profiles) SearchProfile ¶
func (p *Profiles) SearchProfile(w http.ResponseWriter, r *http.Request)
SearchProfile returns a profiles information based on input search parameters.