Documentation ¶
Overview ¶
Package profile is handling concurrent Profile object
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService( repo Repository, entity core.EntityService, policy core.PolicyService, semanticid core.SemanticIDService, ) core.ProfileService
NewService creates a new profile service
Types ¶
type Handler ¶
type Handler interface { Get(c echo.Context) error GetBySemanticID(c echo.Context) error Query(c echo.Context) error }
Handler is the interface for handling HTTP requests
func NewHandler ¶
func NewHandler(service core.ProfileService) Handler
NewHandler creates a new handler
type Repository ¶
type Repository interface { Upsert(ctx context.Context, profile core.Profile) (core.Profile, error) Get(ctx context.Context, id string) (core.Profile, error) GetByAuthorAndSchema(ctx context.Context, owner string, schema string) ([]core.Profile, error) GetByAuthor(ctx context.Context, owner string) ([]core.Profile, error) GetBySchema(ctx context.Context, schema string) ([]core.Profile, error) Delete(ctx context.Context, id string) (core.Profile, error) Clean(ctx context.Context, ccid string) error Count(ctx context.Context) (int64, error) }
Repository is the interface for profile repository
func NewRepository ¶
func NewRepository(db *gorm.DB, mc *memcache.Client, schema core.SchemaService) Repository
NewRepository creates a new profile repository
Click to show internal directories.
Click to hide internal directories.