Versions in this module Expand all Collapse all v0 v0.1.0 Jun 16, 2022 Changes in this version + var ErrInvalidID = errors.New("ID is not in its proper form") + var ErrNotFound = errors.New("user not found") + type Core struct + func NewCore(log *zap.SugaredLogger, sqlxDB *sqlx.DB) Core + func (c Core) Create(ctx context.Context, workspaceID string, userID string, now time.Time) (WorkspaceUser, error) + func (c Core) Delete(ctx context.Context, workspaceUserID string) error + func (c Core) InviteUser(ctx context.Context, workspaceID string, ni InviteUsers, now time.Time) ([]WorkspaceUser, error) + func (c Core) Query(ctx context.Context, workspaceID string, pageNumber int, rowsPerPage int) ([]WorkspaceUser, error) + func (c Core) QueryByID(ctx context.Context, workspaceUserID string) (WorkspaceUser, error) + func (c Core) QueryByuIDwID(ctx context.Context, workspaceID, userID string) (WorkspaceUser, error) + func (c Core) Update(ctx context.Context, workspaceUserID string, uwu UpdateWorkspaceUser, ...) error + type InviteUsers struct + Emails []string + InviterID string + type UpdateWorkspaceUser struct + Active *bool + Admin *bool + type WorkspaceUser struct + Active bool + Admin bool + DateCreated time.Time + DateUpdated time.Time + ID string + InviteKey string + Uid string + Wid string