Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapToSettingEntity ¶
func MapToSettingEntity(dto *json.SettingsDTO) domain.SettingsEntity
Types ¶
type IHasher ¶
func NewMD5Hasher ¶
func NewMD5Hasher() IHasher
func NewSHA256Hasher ¶
func NewSHA256Hasher() IHasher
type ILoaderService ¶
type LoaderService ¶
type LoaderService struct {
// contains filtered or unexported fields
}
func NewLoaderService ¶
func NewLoaderService(hasher IHasher, reader *json.Reader, settingsRepo domain.ISettingsRepo, rootPath string) *LoaderService
func (*LoaderService) LoadComponent ¶
func (l *LoaderService) LoadComponent(cType string, version string, expectedHash []byte) ([]byte, []byte, error)
LoadComponent retrieves the binary content and checksum of a component given its type and version.
Parameters:
- Type: The type of the component to load.
- Version: The version of the component to load.
Returns:
- []byte: The binary content of the component.
- []byte: The checksum or hash for verification.
- error: An error message if the component could not be loaded.
type SHA256Hasher ¶
type SHA256Hasher struct{}
func (*SHA256Hasher) Hash ¶
func (h *SHA256Hasher) Hash(data []byte) []byte
Click to show internal directories.
Click to hide internal directories.