scene

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Scene provides well structured template contexts and functionality for HTML template rendering. We chose the word "scene" to represent the context since "context" is an overloaded term and milieu was too hard to spell.

Index

Constants

View Source
const (
	Version         = "Version"
	Page            = "Page"
	IsAuthenticated = "IsAuthenticated"
	User            = "User"
	APIData         = "APIData"
	SunriseEnabled  = "SunriseEnabled"
)

Keys for default Scene context items

View Source
const (
	RoleAdmin      = "Admin"
	RoleCompliance = "Compliance"
	RoleObserver   = "Observer"
)

Role string constants

Variables

This section is empty.

Functions

func WithConf added in v0.28.0

func WithConf(conf *config.Config)

Types

type AddressComponents added in v0.28.0

type AddressComponents struct {
	AddressType    string
	AddressLine1   string
	AddressLine2   string
	City           string
	Region         string
	PostCode       string
	AddressCountry string
}

type IVMS101 added in v0.28.0

type IVMS101 struct {
	Originator      Person
	OriginatorVASP  VASP
	Beneficiary     Person
	BeneficiaryVASP VASP
}

IVMS101 is a struct that represents the complex IVMS101 data as a flattened struct with only the data that is required by our web application.

type NationalIdentifier added in v0.28.0

type NationalIdentifier struct {
	Identifier            string
	TypeRepr              string
	TypeCode              string
	CountryOfIssue        string
	RegistrationAuthority string
}

type Person added in v0.28.0

type Person struct {
	AddressComponents
	FullLegalName       string
	PrimaryName         string
	SecondaryName       string
	PrimaryAddress      *ivms101.Address
	PrimaryAddressLines []string
	CustomerNumber      string
	NationalIdentifier  NationalIdentifier
	DateOfBirth         string
	PlaceOfBirth        string
	CountryOfResidence  string
}

type Scene

type Scene map[string]interface{}

func New

func New(c *gin.Context) Scene

func (Scene) APIKeyDetail added in v0.24.1

func (s Scene) APIKeyDetail() *api.APIKey

func (Scene) APIKeysList added in v0.24.1

func (s Scene) APIKeysList() *api.APIKeyList

func (Scene) AccountDetail added in v0.19.0

func (s Scene) AccountDetail() *api.Account

func (Scene) AccountsList

func (s Scene) AccountsList() *api.AccountsList

func (Scene) CounterpartyDetail added in v0.25.0

func (s Scene) CounterpartyDetail() *api.Counterparty

func (Scene) CounterpartyList

func (s Scene) CounterpartyList() *api.CounterpartyList

func (Scene) CreateAPIKey added in v0.24.1

func (s Scene) CreateAPIKey() *api.APIKey

func (Scene) Envelope added in v0.28.0

func (s Scene) Envelope() *api.Envelope

func (Scene) GetUser

func (s Scene) GetUser() *auth.Claims

func (Scene) HasRole

func (s Scene) HasRole(role string) bool

func (Scene) IVMS101 added in v0.28.0

func (s Scene) IVMS101() *IVMS101

Return the simplified/flattened IVMS101 identity representation if an Envelope has been set as the APIData in the Scene.

func (Scene) IsAdmin

func (s Scene) IsAdmin() bool

func (Scene) IsAuthenticated

func (s Scene) IsAuthenticated() bool

func (Scene) IsViewOnly

func (s Scene) IsViewOnly() bool

func (Scene) TransactionDetail added in v0.19.0

func (s Scene) TransactionDetail() *api.Transaction

func (Scene) TransactionsList added in v0.19.0

func (s Scene) TransactionsList() *api.TransactionsList

func (Scene) Update

func (s Scene) Update(o Scene) Scene

func (Scene) UserList

func (s Scene) UserList() *api.UserList

func (Scene) WithAPIData

func (s Scene) WithAPIData(data interface{}) Scene

type VASP added in v0.28.0

type VASP struct {
	AddressComponents
	LegalName             string
	PrimaryAddress        *ivms101.Address
	PrimaryAddressLines   []string
	CustomerNumber        string
	CountryOfRegistration string
	NationalIdentifier    NationalIdentifier
}

Jump to

Keyboard shortcuts

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