Documentation
¶
Index ¶
- func ConvertPermissions(permissions subspacestypes.Permissions) pq.StringArray
- func ConvertProfileRow(row ProfileRow) (*profilestypes.Profile, error)
- func RemoveEmpty(s []string) []string
- func ToNullString(value string) sql.NullString
- func ToNullTime(value *time.Time) sql.NullTime
- type BlockageRow
- type DbCoin
- type DbCoins
- type ProfileRow
- type RelationshipRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertPermissions ¶
func ConvertPermissions(permissions subspacestypes.Permissions) pq.StringArray
ConvertPermissions converts the given permissions into a pq.StringArray so that it can be properly inserted into the database
func ConvertProfileRow ¶
func ConvertProfileRow(row ProfileRow) (*profilestypes.Profile, error)
ConvertProfileRow converts the given row into a profile
func RemoveEmpty ¶
RemoveEmpty removes all empty strings from the given slice
func ToNullString ¶
func ToNullString(value string) sql.NullString
ToNullString converts the given value to a nullable string
Types ¶
type BlockageRow ¶
type BlockageRow struct {
Blocker string `db:"blocker_address"`
Blocked string `db:"blocked_address"`
Reason string `db:"reason"`
Subspace uint64 `db:"subspace_id"`
Height int64 `db:"height"`
}
BlockageRow represents a single database row containing the data of a user blockage
func NewBlockageRow ¶
func (BlockageRow) Equal ¶
func (row BlockageRow) Equal(other BlockageRow) bool
type DbCoin ¶
DbCoin represents the information stored inside the database about a single coin
type DbCoins ¶
type DbCoins []*DbCoin
DbCoins represents an array of coins
func NewDbCoins ¶
NewDbCoins build a new DbCoins object starting from an array of coins
type ProfileRow ¶
type ProfileRow struct {
Address string `db:"address"`
DTag string `db:"dtag"`
Nickname string `db:"nickname"`
Bio string `db:"bio"`
ProfilePic string `db:"profile_pic"`
CoverPic string `db:"cover_pic"`
CreationTime time.Time `db:"creation_time"`
Height int64 `db:"height"`
}
ProfileRow represents a single PostgreSQL row containing the data of a profile
type RelationshipRow ¶
type RelationshipRow struct {
RowID uint64 `db:"row_id"`
Creator string `db:"creator_address"`
Counterparty string `db:"counterparty_address"`
Subspace uint64 `db:"subspace_id"`
Height int64 `db:"height"`
}
RelationshipRow represents a database row containing the data of a relationship between two users
func NewRelationshipRow ¶
func NewRelationshipRow(sender string, receiver string, subspace uint64, height int64) RelationshipRow
func (RelationshipRow) Equal ¶
func (row RelationshipRow) Equal(other RelationshipRow) bool