models

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

User represents a user in our system

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

UserService handles user-related business logic

func NewUserService

func NewUserService(logger *zap.Logger) *UserService

NewUserService creates a new user service

func (*UserService) CreateUser

func (s *UserService) CreateUser(name, email string) User

CreateUser creates a new user

func (*UserService) GetUserByID

func (s *UserService) GetUserByID(id string) (*User, bool)

GetUserByID returns a user by ID

func (*UserService) GetUsers

func (s *UserService) GetUsers() []User

GetUsers returns all users

Jump to

Keyboard shortcuts

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