socialcache

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	SteamId     steamid.SteamId `json:",string"`
	GroupId     steamid.SteamId `json:",string"`
	ChatMembers map[steamid.SteamId]ChatMember
}

A Chat

type ChatMember

type ChatMember struct {
	SteamId         steamid.SteamId `json:",string"`
	ChatPermissions steamlang.EChatPermission
	ClanPermissions steamlang.EClanPermission
}

A Chat Member

type ChatsList

type ChatsList struct {
	// contains filtered or unexported fields
}

Chats list is a thread safe map They can be iterated over like so:

for id, chat := range client.Social.Chats.GetCopy() {
	log.Println(id, chat.Name)
}

func NewChatsList

func NewChatsList() *ChatsList

Returns a new chats list

func (*ChatsList) Add

func (list *ChatsList) Add(chat Chat)

Adds a chat to the chat list

func (*ChatsList) AddChatMember

func (list *ChatsList) AddChatMember(id steamid.SteamId, member ChatMember)

Adds a chat member to a given chat

func (*ChatsList) ById

func (list *ChatsList) ById(id steamid.SteamId) (Chat, error)

Returns a copy of the chat of a given SteamId

func (*ChatsList) Count

func (list *ChatsList) Count() int

Returns the number of chats

func (*ChatsList) GetCopy

func (list *ChatsList) GetCopy() map[steamid.SteamId]Chat

Returns a copy of the chats map

func (*ChatsList) Remove

func (list *ChatsList) Remove(id steamid.SteamId)

Removes a chat from the chat list

func (*ChatsList) RemoveChatMember

func (list *ChatsList) RemoveChatMember(id steamid.SteamId, member steamid.SteamId)

Removes a chat member from a given chat

type Friend

type Friend struct {
	SteamId           steamid.SteamId `json:",string"`
	Name              string
	Avatar            []byte
	Relationship      steamlang.EFriendRelationship
	PersonaState      steamlang.EPersonaState
	PersonaStateFlags steamlang.EPersonaStateFlag
	GameAppId         uint32
	GameId            uint64 `json:",string"`
	GameName          string
}

A Friend

type FriendsList

type FriendsList struct {
	// contains filtered or unexported fields
}

Friends list is a thread safe map They can be iterated over like so:

for id, friend := range client.Social.Friends.GetCopy() {
	log.Println(id, friend.Name)
}

func NewFriendsList

func NewFriendsList() *FriendsList

Returns a new friends list

func (*FriendsList) Add

func (list *FriendsList) Add(friend Friend)

Adds a friend to the friend list

func (*FriendsList) ById

func (list *FriendsList) ById(id steamid.SteamId) (Friend, error)

Returns a copy of the friend of a given SteamId

func (*FriendsList) Count

func (list *FriendsList) Count() int

Returns the number of friends

func (*FriendsList) GetCopy

func (list *FriendsList) GetCopy() map[steamid.SteamId]Friend

Returns a copy of the friends map

func (*FriendsList) Remove

func (list *FriendsList) Remove(id steamid.SteamId)

Removes a friend from the friend list

func (*FriendsList) SetAvatar

func (list *FriendsList) SetAvatar(id steamid.SteamId, hash []byte)

func (*FriendsList) SetGameAppId

func (list *FriendsList) SetGameAppId(id steamid.SteamId, gameappid uint32)

func (*FriendsList) SetGameId

func (list *FriendsList) SetGameId(id steamid.SteamId, gameid uint64)

func (*FriendsList) SetGameName

func (list *FriendsList) SetGameName(id steamid.SteamId, name string)

func (*FriendsList) SetName

func (list *FriendsList) SetName(id steamid.SteamId, name string)

Setter methods

func (*FriendsList) SetPersonaState

func (list *FriendsList) SetPersonaState(id steamid.SteamId, state steamlang.EPersonaState)

func (*FriendsList) SetPersonaStateFlags

func (list *FriendsList) SetPersonaStateFlags(id steamid.SteamId, flags steamlang.EPersonaStateFlag)

func (*FriendsList) SetRelationship

func (list *FriendsList) SetRelationship(id steamid.SteamId, relationship steamlang.EFriendRelationship)

type Group

type Group struct {
	SteamId             steamid.SteamId `json:",string"`
	Name                string
	Avatar              []byte
	Relationship        steamlang.EClanRelationship
	MemberTotalCount    uint32
	MemberOnlineCount   uint32
	MemberChattingCount uint32
	MemberInGameCount   uint32
}

A Group

type GroupsList

type GroupsList struct {
	// contains filtered or unexported fields
}

Groups list is a thread safe map They can be iterated over like so:

for id, group := range client.Social.Groups.GetCopy() {
	log.Println(id, group.Name)
}

func NewGroupsList

func NewGroupsList() *GroupsList

Returns a new groups list

func (*GroupsList) Add

func (list *GroupsList) Add(group Group)

Adds a group to the group list

func (*GroupsList) ById

func (list *GroupsList) ById(id steamid.SteamId) (Group, error)

Returns a copy of the group of a given SteamId

func (*GroupsList) Count

func (list *GroupsList) Count() int

Returns the number of groups

func (*GroupsList) GetCopy

func (list *GroupsList) GetCopy() map[steamid.SteamId]Group

Returns a copy of the groups map

func (*GroupsList) Remove

func (list *GroupsList) Remove(id steamid.SteamId)

Removes a group from the group list

func (*GroupsList) SetAvatar

func (list *GroupsList) SetAvatar(id steamid.SteamId, hash []byte)

func (*GroupsList) SetMemberChattingCount

func (list *GroupsList) SetMemberChattingCount(id steamid.SteamId, count uint32)

func (*GroupsList) SetMemberInGameCount

func (list *GroupsList) SetMemberInGameCount(id steamid.SteamId, count uint32)

func (*GroupsList) SetMemberOnlineCount

func (list *GroupsList) SetMemberOnlineCount(id steamid.SteamId, count uint32)

func (*GroupsList) SetMemberTotalCount

func (list *GroupsList) SetMemberTotalCount(id steamid.SteamId, count uint32)

func (*GroupsList) SetName

func (list *GroupsList) SetName(id steamid.SteamId, name string)

Setter methods

func (*GroupsList) SetRelationship

func (list *GroupsList) SetRelationship(id steamid.SteamId, relationship steamlang.EClanRelationship)

Jump to

Keyboard shortcuts

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