conversation

package
v0.0.0-...-d808fcf Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Create

type Create struct {
	ClientID          string   `json:"ClientID"`
	ConversationName  string   `json:"ConversationName"`
	ConversationAdmin string   `json:"ConversationAdmin"`
	Members           []Member `json:"Members"`
	// contains filtered or unexported fields
}

Create holds conversation api data

func (Create) Err

func (c Create) Err() error

Err returns conversation create package errors

func (Create) ToDB

func (c Create) ToDB(db *dbdt.Conversation)

ToDB converts conversation create api data to DB data

func (*Create) Valid

func (c *Create) Valid()

Valid valids conversation data

type Get

type Get struct {
	api.Basic

	ClientID          string   `json:"ClientID"`
	ConversationName  string   `json:"ConversationName"`
	ConversationAdmin string   `json:"ConversationAdmin"`
	Members           []Member `json:"Members"`
}

Get handles conversation get data

func (*Get) FromDB

func (c *Get) FromDB(db dbdt.Conversation)

FromDB sets conversation data from DB

type Member

type Member struct {
	MemberID string `json:"MemberID"`
	NickName string `json:"NickName"`
	Role     string `json:"Role"`

	JoinedBy    string    `json:"JoinedBy"`
	JoiningTime time.Time `json:"JoiningTime"`

	RemovedBy    string    `json:"RemovedBy,omitempty"`
	RemovingTime time.Time `json:"RemovingTime,omitempty"`

	LeavingTime time.Time `json:"LeavingTime,omitempty"`
}

Member holds conversation member info

type Update

type Update struct {
	ClientID          string   `json:"ClientID"`
	ConversationName  string   `json:"ConversationName"`
	ConversationAdmin string   `json:"ConversationAdmin"`
	Members           []Member `json:"Members"`
	// contains filtered or unexported fields
}

Update handles conversation update api data

func (Update) Err

func (u Update) Err() error

Err returns product update package errors

func (Update) ToDB

func (u Update) ToDB(ID string, db *dbdt.Conversation)

ToDB converts conversation create api data to DB data

func (*Update) Valid

func (u *Update) Valid()

Valid valids product data

Jump to

Keyboard shortcuts

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