socialcache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

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.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            string
	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
}

FriendsList 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

NewFriendsList builds a new friends list

func (*FriendsList) Add

func (list *FriendsList) Add(friend Friend)

Add 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)

Remove removes a friend from the friend list

func (*FriendsList) SetAvatar

func (list *FriendsList) SetAvatar(id steamid.SteamID, hash string)

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              string
	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

GetCopy returns a copy of the groups map

func (*GroupsList) Remove

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

Remove removes a group from the group list

func (*GroupsList) SetAvatar

func (list *GroupsList) SetAvatar(id steamid.SteamID, hash string)

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