model

package
v0.0.0-...-ae79bc6 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

---------------------------------------------------------------------------------------------- // -- Copyright (c) 2024 Braden Hitchcock - MIT License (https://opensource.org/licenses/MIT) -- // ---------------------------------------------------------------------------------------------- //

---------------------------------------------------------------------------------------------- // -- Copyright (c) 2024 Braden Hitchcock - MIT License (https://opensource.org/licenses/MIT) -- // ---------------------------------------------------------------------------------------------- //

---------------------------------------------------------------------------------------------- // -- Copyright (c) 2024 Braden Hitchcock - MIT License (https://opensource.org/licenses/MIT) -- // ---------------------------------------------------------------------------------------------- //

---------------------------------------------------------------------------------------------- // -- Copyright (c) 2024 Braden Hitchcock - MIT License (https://opensource.org/licenses/MIT) -- // ---------------------------------------------------------------------------------------------- //

---------------------------------------------------------------------------------------------- // -- Copyright (c) 2024 Braden Hitchcock - MIT License (https://opensource.org/licenses/MIT) -- // ---------------------------------------------------------------------------------------------- //

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneConversationWithUpdates

func CloneConversationWithUpdates(prev *types.Conversation, name, desc []byte, mods [][]byte) *types.Conversation

func CloneMemberWithUpdates

func CloneMemberWithUpdates(prev *types.Member, uname, name []byte) *types.Member

func CloneMessageWithUpdates

func CloneMessageWithUpdates(prev *types.Message, content []byte) *types.Message

func ConversationEqual

func ConversationEqual(a, b *types.Conversation) bool

func GroupCloneWithUpdates

func GroupCloneWithUpdates(prev *types.Group, gid, name, desc []byte) *types.Group

func GroupEqual

func GroupEqual(a, b *types.Group) bool

func MemberEqual

func MemberEqual(a, b *types.Member) bool

func MessageEqual

func MessageEqual(a, b *types.Message) bool

func NewConversation

func NewConversation(name, desc string, mods []Uuid) (*types.Conversation, error)

func NewGroup

func NewGroup(gid, name, desc string) (*types.Group, error)

func NewMember

func NewMember(username, name string) (*types.Member, error)

func NewMessage

func NewMessage(author, convo Uuid, content string) (*types.Message, error)

Types

type Uuid

type Uuid string

Uuid is a string that conforms to the RFC 4122 format for a Universally Unique Identifier.

func NewUuid

func NewUuid() (Uuid, error)

NewUuid creates a new RFC 4122 v4 UUID and returns its string representation. Creation of the UUID could fail while trying to fetch cryptographically strong random bytes for the ID.

Jump to

Keyboard shortcuts

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