handlers

package
v0.0.0-...-88dbfc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func (p *Profiles) MiddleWareValidateProfile(next http.Handler) http.Handler

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL