Documentation
¶
Index ¶
- Constants
- Variables
- type Asset
- type Data
- type DataMap
- type Feature
- type InterfaceCommon
- type Privilege
- type Privileges
- type Product
- type ProductUsers
- type Project
- type RepoInterface
- func (RepoInterface) NewAsset(references DataMap, generatePath func(assetID *uuid.UUID) string) (*Asset, error)
- func (RepoInterface) NewProduct(name string, public bool, detailsID *uuid.UUID, assetsID *uuid.UUID) (*Product, error)
- func (RepoInterface) NewUser(name string, email string, password []byte, settingsID uuid.UUID, ...) (*User, error)
- type RepoUUIDInterface
- type UUIDImplMock
- type UUIDInterfaceCommon
- type User
- type UserProducts
Constants ¶
View Source
const ( BaseAssetPath = "base_asset_path" UserAvatar = "user_avatar" UserBackground = "user_background" ProductDescription = "product_description" )
View Source
const ( SupportClients = "support_clients" ClientUI = "client_ui" ProjectUI = "project_ui" Requires3D = "requires_3d" HasTrial = "has_trial" IsFree = "is_free" )
View Source
const (
TwoStepsVerif = "two_steps_verif"
)
Variables ¶
View Source
var DefaultImagePath = ""
View Source
var DefaultURL = ""
View Source
var ErrAssetRefNotInitialised = errors.New("Asset references not initialised")
View Source
var ErrInvalidAssetsID = "Invalid assets uuid"
View Source
var ErrInvalidSettingsID = "Invalid settings uuid"
View Source
var ErrProductDetailsNotInitialised = "Details map not initialised"
View Source
var ErrSettingNotInitialised = "Settings not initialised"
View Source
var NullUUID = uuid.MustParse("00000000-0000-0000-0000-000000000000")
Functions ¶
This section is empty.
Types ¶
type Asset ¶
func (*Asset) ClearAsset ¶ added in v0.0.7
func (*Asset) GetImagePath ¶ added in v0.0.7
func (*Asset) SetImagePath ¶ added in v0.0.7
type DataMap ¶ added in v0.0.7
type DataMap map[string]interface{}
Assets structure contains the identification of all user related documents images.
type Feature ¶
type Feature struct { ID int `json:"id"` Name string `json:"name"` Config json.RawMessage `json:"config"` }
Feature describes the available simulation features.
type InterfaceCommon ¶ added in v0.0.7
type InterfaceCommon interface { NewAsset(references DataMap, generatePath func(assetID *uuid.UUID) string) (*Asset, error) NewUser( name string, email string, password []byte, settingsID uuid.UUID, assetsID uuid.UUID) (*User, error) NewProduct(name string, public bool, detailsID *uuid.UUID, assetsID *uuid.UUID) (*Product, error) }
var Interface InterfaceCommon
type Privileges ¶
type Privileges []Privilege
func (Privileges) IsOwnerPrivilege ¶ added in v0.0.7
func (l Privileges) IsOwnerPrivilege(privilege int) bool
func (Privileges) IsPartnerPrivilege ¶ added in v0.0.7
func (l Privileges) IsPartnerPrivilege(privilege int) bool
func (Privileges) IsValidPrivilege ¶
func (l Privileges) IsValidPrivilege(privilege int) bool
type ProductUsers ¶
type Project ¶
type Project struct { ID uuid.UUID `json:"id"` Name string `json:"name"` UserID uuid.UUID `json:"user_id"` FeatureID int `json:"features_id"` Config json.RawMessage `json:"config"` }
Project defines the project structure.
type RepoInterface ¶ added in v0.0.7
type RepoInterface struct { }
func (RepoInterface) NewProduct ¶ added in v0.0.7
func (RepoInterface) NewProduct(name string, public bool, detailsID *uuid.UUID, assetsID *uuid.UUID) (*Product, error)
NewProduct creates a new product instance where details describe the configuration of the product and references contain all asset references.
type RepoUUIDInterface ¶ added in v0.0.7
type RepoUUIDInterface struct { }
type UUIDImplMock ¶ added in v0.0.7
type UUIDImplMock struct {
// contains filtered or unexported fields
}
UUIDImplMock overwrites the default github uuid library implementation.
type UUIDInterfaceCommon ¶ added in v0.0.7
var UUIDImpl UUIDInterfaceCommon
Click to show internal directories.
Click to hide internal directories.