mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-22 20:57:50 +01:00
huge changes that need more doucmenting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
File Name: Block Record File.go
|
||||
File Username: Block Record File.go
|
||||
Copyright: 2021 Peernet s.r.o.
|
||||
Author: Peter Kleissner
|
||||
|
||||
@@ -48,6 +48,8 @@ type BlockRecordFile struct {
|
||||
Size uint64 // Size of the file data
|
||||
NodeID []byte // Node ID, owner of the file
|
||||
Tags []BlockRecordFileTag // Tags provide additional metadata
|
||||
ProfileImage []byte // ProfileImage of the user who uploaded the file
|
||||
Username string // Username of the User who uploaded the file
|
||||
}
|
||||
|
||||
// BlockRecordFileTag provides metadata about the file.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
File Name: Block Record Profile.go
|
||||
File Username: Block Record Profile.go
|
||||
Copyright: 2021 Peernet s.r.o.
|
||||
Author: Peter Kleissner
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
File Name: Block Record.go
|
||||
File Username: Block Record.go
|
||||
Copyright: 2021 Peernet s.r.o.
|
||||
Author: Peter Kleissner
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
File Name: Block.go
|
||||
File Username: Block.go
|
||||
Copyright: 2021 Peernet s.r.o.
|
||||
Author: Peter Kleissner
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
File Name: Blockchain.go
|
||||
File Username: Blockchain.go
|
||||
Copyright: 2021 Peernet s.r.o.
|
||||
Author: Peter Kleissner
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
File Name: File Tag.go
|
||||
File Username: File Tag.go
|
||||
Copyright: 2021 Peernet s.r.o.
|
||||
Author: Peter Kleissner
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
// List of defined file tags. Virtual tags are generated at runtime and are read-only. They cannot be stored on the blockchain.
|
||||
const (
|
||||
TagName = 0 // Name of file.
|
||||
TagName = 0 // Username of file.
|
||||
TagFolder = 1 // Folder name.
|
||||
TagDescription = 2 // Arbitrary description of the file. May contain hashtags.
|
||||
TagDateShared = 3 // When the file was published on the blockchain. Virtual.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
File Name: File.go
|
||||
File Username: File.go
|
||||
Copyright: 2021 Peernet s.r.o.
|
||||
Author: Peter Kleissner
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
File Name: Multi.go
|
||||
File Username: Multi.go
|
||||
Copyright: 2021 Peernet s.r.o.
|
||||
Author: Peter Kleissner
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
File Name: Profile Data.go
|
||||
File Username: Profile Data.go
|
||||
Copyright: 2021 Peernet s.r.o.
|
||||
Author: Peter Kleissner
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
File Name: Profile.go
|
||||
File Username: Profile.go
|
||||
Copyright: 2021 Peernet s.r.o.
|
||||
Author: Peter Kleissner
|
||||
*/
|
||||
|
||||
@@ -167,7 +167,7 @@ func printFile(file BlockRecordFile) {
|
||||
for _, tag := range file.Tags {
|
||||
switch tag.Type {
|
||||
case TagName:
|
||||
fmt.Printf(" Name %s\n", tag.Text())
|
||||
fmt.Printf(" Username %s\n", tag.Text())
|
||||
case TagFolder:
|
||||
fmt.Printf(" Folder %s\n", tag.Text())
|
||||
case TagDescription:
|
||||
|
||||
Reference in New Issue
Block a user