service

package
v0.0.0-...-aff41f5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUserParams

type CreateUserParams struct {
	Name             string    `json:"name"`
	ScreenName       string    `json:"screen_name"`
	RawPassword      string    `json:"password"`
	Email            string    `json:"email"`
	Bio              string    `json:"bio"`
	Location         string    `json:"location"`
	Website          string    `json:"website"`
	ProfileImageURL  string    `json:"profile_image_url"`
	ProfileBannerURL string    `json:"profile_banner_url"`
	BirthDate        time.Time `json:"birth_date"`
}

type Service

type Service interface {
	// FindUserByID finds a user by id
	FindUserByID(ctx context.Context, id string) (models.User, error)

	// FindUserByEmail finds a user by email
	FindUserByEmail(ctx context.Context, email string) (models.User, error)

	// CreateUser creates a new user
	CreateUser(ctx context.Context, params CreateUserParams) (models.User, error)

	// DeleteUser deletes an existing user
	DeleteUser(ctx context.Context, id string) error
}

Service is the interface that provides user related methods

func NewService

func NewService(clients clients.Clients) Service

NewService creates a new user business-layer service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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