tu-wien
/
kerma
Archived
2
0
Fork 0
This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
kerma/models/interfaces.go

30 lines
618 B
Go

// Package models provides the models for the KermaGo application
package models
/*
An IEntity is an interface that represents a Kerma entity - either a Block or a Transaction
*/
type IEntity interface {
Hash() (string, error)
GetType() string
GetID() string
GetEntity() interface{}
Validate() error
String() string
}
/*
An IObject is an interface that represents a Kerma object
*/
type IObject interface {
GetObjectValue() (IEntity, error)
String() string
}
/*
A CustomMarshaler is an interface that provides custom marshaling functions
*/
type CustomMarshaler interface {
MarshalJson() ([]byte, error)
}