profile

package
v0.0.0-...-dfd90ba Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FullUpdateParams

type FullUpdateParams struct {
	Id           int
	Username     string
	Name         string
	ProfileImage models.Image
	WebsiteUrl   string
}

type PartialUpdateParams

type PartialUpdateParams struct {
	Id                 int
	Username           string
	UpdateUsername     bool
	Name               string
	UpdateName         bool
	ProfileImage       models.Image
	UpdateProfileImage bool
	WebsiteUrl         string
	UpdateWebsiteUrl   bool
}

type Profile

type Profile struct {
	Username     string
	Name         string
	ProfileImage string
	WebsiteUrl   string
}

type Repository

type Repository interface {
	GetProfileByUser(userId int) (Profile, error)
	FullUpdate(params *FullUpdateParams) (Profile, error)
	PartialUpdate(params *PartialUpdateParams) (Profile, error)

	IsUsernameAvailable(username string, userId int) (bool, error)
}

type Service

type Service interface {
	GetProfileByUser(userId int) (Profile, error)
	FullUpdate(params *FullUpdateParams) (Profile, error)
	PartialUpdate(params *PartialUpdateParams) (Profile, error)
}

Directories

Path Synopsis
delivery
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
repository

Jump to

Keyboard shortcuts

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