user

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 7 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 {
	Name  string `json:"name"`
	Email string `json:"email"`
}

type UserApplication

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

func NewUserApplication

func NewUserApplication(dirRepo dir.DirectoryRepository, fileRepo file.FileRepository, logger *zap.Logger) *UserApplication

func (*UserApplication) GetProfile

func (app *UserApplication) GetProfile(ctx context.Context, uid int32) (*Profile, error)

GetProfile returns the user profile instance corresponding to the given user id.

type UserEventHandler

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

func NewUserEventHandler

func NewUserEventHandler(dirApp *dir.DirectoryApplication, fileApp *file.FileApplication, logger *zap.Logger) *UserEventHandler

func (*UserEventHandler) OnEvent

func (handler *UserEventHandler) OnEvent(ctx context.Context, body []byte)

type UserEventPayload

type UserEventPayload struct {
	UserID int32  `json:"id"`
	Kind   string `json:"kind"`
	Profile
}

type UserRestService

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

func NewUserRestServer

func NewUserRestServer(app *UserApplication, logger *zap.Logger, authHeader string) *UserRestService

func (*UserRestService) ServeHTTP

func (server *UserRestService) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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