data

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	GitHubUserID int      `db:"github_user_id"`
	GitHubToken  string   `db:"github_token"`
	Username     string   `db:"username"`
	Email        string   `db:"email"`
	AvatarURL    string   `db:"avatar_url"`
	Bio          string   `db:"bio"`
	Skills       []string `db:"skills"`
	Languages    []string `db:"languages"`
}

type ProfileData

type ProfileData struct {
	PDriver *db.PostgresDriver
}

func NewProfileData

func NewProfileData(dbDriver *db.PostgresDriver) *ProfileData

func (*ProfileData) AddProfile

func (pd *ProfileData) AddProfile(githubUserID int, githubToken string, username string, avatarURL string, email string, bio string) error

func (*ProfileData) AddProfileLanguages

func (pd *ProfileData) AddProfileLanguages(githubUserID int, languages ...string) error

func (*ProfileData) AddProfileSkills

func (pd *ProfileData) AddProfileSkills(githubUserID int, skills ...string) error

func (*ProfileData) DeleteProfile

func (pd *ProfileData) DeleteProfile(githubUserID int) error

func (*ProfileData) GetProfile

func (pd *ProfileData) GetProfile(githubUserID int) (*Profile, error)

func (*ProfileData) GetProfileByUsername

func (pd *ProfileData) GetProfileByUsername(username string) (*Profile, error)

func (*ProfileData) RemoveProfileLanguages

func (pd *ProfileData) RemoveProfileLanguages(githubUserID int, languages ...string) error

func (*ProfileData) RemoveProfileSkills

func (pd *ProfileData) RemoveProfileSkills(githubUserID int, skills ...string) error

func (*ProfileData) UpdateProfileAvatarURL

func (pd *ProfileData) UpdateProfileAvatarURL(githubUserID int, avatarURL string) error

func (*ProfileData) UpdateProfileBio

func (pd *ProfileData) UpdateProfileBio(githubUserID int, bio string) error

func (*ProfileData) UpdateProfileEmail

func (pd *ProfileData) UpdateProfileEmail(githubUserID int, email string) error

func (*ProfileData) UpdateProfileToken

func (pd *ProfileData) UpdateProfileToken(githubUserID int, githubToken string) error

func (*ProfileData) UpdateProfileUsername

func (pd *ProfileData) UpdateProfileUsername(githubUserID int, username string) error

type Profiles

type Profiles []*Profile

Jump to

Keyboard shortcuts

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