Versions in this module Expand all Collapse all v4 v4.4.1 Jun 13, 2022 Changes in this version type Connection + func (c *Connection) Allow(features ...OptionalFeature) error + type OptionalFeature byte + const DiceColorBoxes type StatusMarkerDefinition + Description string v4.3.13 Jun 7, 2022 v4.3.12 Apr 23, 2022 Changes in this version + func AnchorDirectionString(m AnchorDirection) string + func AoETypeString(m AoEType) string + func ArcModeString(m ArcModeType) string + func ArrowTypeString(m ArrowType) string + func CreatureTypeString(t CreatureTypeCode) string + func DashTypeString(m DashType) string + func FontSlantString(m FontSlantType) string + func FontWeightString(m FontWeightType) string + func JoinStyleString(m JoinStyle) string + func MoveModeString(m MoveModeType) string + type AnchorDirection byte + type AoEType byte + type ArcModeType byte + type ArrowType byte type Connection + CalendarSystem string + func (c *Connection) Polo() error + type ConnectionOption func(*Connection) error + type CreatureTypeCode byte + type DashType byte + type FontSlantType byte + type FontWeightType byte + type JoinStyle byte + type MoveModeType byte v4.3.11 Oct 17, 2021 Changes in this version + const AddCharacter + const AddImage + const AddObjAttributes + const AdjustView + const AnchorCenter + const AnchorEast + const AnchorNE + const AnchorNW + const AnchorNorth + const AnchorSE + const AnchorSW + const AnchorSouth + const AnchorWest + const AoEShapeCone + const AoEShapeRadius + const AoEShapeRay + const ArcModeArc + const ArcModeChord + const ArcModePieSlice + const ArrowBoth + const ArrowFirst + const ArrowLast + const ArrowNone + const ChatMessage + const Clear + const ClearChat + const ClearFrom + const CombatMode + const Comment + const CreatureTypeMonster + const CreatureTypePlayer + const CreatureTypeUnknown + const DashLong + const DashLong2Short + const DashLongShort + const DashMedium + const DashShort + const DashSolid + const ERROR + const FontSlantItalic + const FontSlantRoman + const FontWeightBold + const FontWeightNormal + const GMAMapperFileFormat + const GMAMapperProtocol + const GMAVersionNumber + const JoinBevel + const JoinMiter + const JoinRound + const LoadFrom + const LoadObject + const Marco + const Mark + const MaximumSupportedMapFileFormat + const MaximumSupportedMapProtocol + const MinimumSupportedMapFileFormat + const MinimumSupportedMapProtocol + const MoveModeBurrow + const MoveModeClimb + const MoveModeFly + const MoveModeLand + const MoveModeSwim + const PlaceSomeone + const QueryImage + const RemoveObjAttributes + const RollResult + const ToAll + const ToGMOnly + const Toolbar + const UNKNOWN + const UpdateClock + const UpdateDicePresets + const UpdateInitiative + const UpdateObjAttributes + const UpdatePeerList + const UpdateProgress + const UpdateStatusMarker + const UpdateTurn + var ErrAuthenticationFailed = errors.New("access denied to server") + var ErrAuthenticationRequired = errors.New("authenticator required for connection") + func ParseObjects(dataStream []string) ([]MapObject, map[string]ImageDefinition, []FileDefinition, error) + func SaveObjects(objects []MapObject, images map[string]ImageDefinition, files []FileDefinition, ...) ([]string, error) + func StayConnected(enable bool) func(*Connection) error + func WithAuthenticator(a *auth.Authenticator) func(*Connection) error + func WithComment(c string) func(*saveObjOpts) + func WithContext(ctx context.Context) func(*Connection) error + func WithDate(d time.Time) func(*saveObjOpts) + func WithDebugging(level uint) func(*Connection) error + func WithLogger(l *log.Logger) func(*Connection) error + func WithRetries(n uint) func(*Connection) error + func WithSubscription(ch chan MessagePayload, messages ...ServerMessage) func(*Connection) error + func WithTimeout(t time.Duration) func(*Connection) error + func WithoutHeader(o *saveObjOpts) + type AddCharacterMessagePayload struct + type AddImageMessagePayload struct + ImageData []byte + type AddObjAttributesMessagePayload struct + AttrName string + ObjID string + Values []string + type AdjustViewMessagePayload struct + XView float64 + YView float64 + type ArcElement struct + ArcMode byte + Extent float64 + Start float64 + type BaseMapObject struct + ID string + func (o BaseMapObject) ObjID() string + type BaseMessagePayload struct + func (p BaseMessagePayload) MessageType() ServerMessage + func (p BaseMessagePayload) RawMessage() []string + type CharacterDefinition struct + Area string + Color string + Name string + ObjID string + Size string + func (c CharacterDefinition) Text() string + type CharacterDefinitions map[string]CharacterDefinition + func (cs CharacterDefinitions) Text() string + type ChatCommon struct + MessageID int + Recipients []string + Sender string + ToAll bool + ToGM bool + type ChatMessageMessagePayload struct + Text string + type CircleElement struct + type ClearChatMessagePayload struct + DoSilently bool + MessageID int + RequestedBy string + Target int + type ClearFromMessagePayload struct + type ClearMessagePayload struct + ObjID string + type CombatModeMessagePayload struct + Enabled bool + type CommentMessagePayload struct + Text string + type Connection struct + Authenticator *auth.Authenticator + Characters map[string]CharacterDefinition + Conditions map[string]StatusMarkerDefinition + Context context.Context + DebuggingLevel uint + Endpoint string + Gauges map[string]*UpdateProgressMessagePayload + LastError error + Logger *log.Logger + Preamble []string + Protocol int + Retries uint + StayConnected bool + Subscriptions map[ServerMessage]chan MessagePayload + Timeout time.Duration + func NewConnection(endpoint string, opts ...func(*Connection) error) (Connection, error) + func (c *Connection) AddDicePresets(presets []DieRollPreset) error + func (c *Connection) AddImage(idef ImageDefinition) error + func (c *Connection) AddImageData(idef ImageDefinition, data []byte) error + func (c *Connection) AddObjAttributes(objID, attrName string, values []string) error + func (c *Connection) AdjustView(xview, yview float64) error + func (c *Connection) CacheFile(serverID string) error + func (c *Connection) ChatMessage(to []string, message string) error + func (c *Connection) ChatMessageToAll(message string) error + func (c *Connection) ChatMessageToGM(message string) error + func (c *Connection) Clear(objID string) error + func (c *Connection) ClearChat(target int, silently bool) error + func (c *Connection) ClearFrom(serverID string) error + func (c *Connection) Close() + func (c *Connection) CombatMode(enabled bool) error + func (c *Connection) DefineDicePresets(presets []DieRollPreset) error + func (c *Connection) Dial() + func (c *Connection) FilterDicePresets(re string) error + func (c *Connection) IsReady() bool + func (c *Connection) LoadFrom(path string, local bool, merge bool) error + func (c *Connection) LoadObject(mo MapObject) error + func (c *Connection) Mark(x, y float64) error + func (c *Connection) PlaceSomeone(someone interface{}) error + func (c *Connection) QueryDicePresets() error + func (c *Connection) QueryImage(idef ImageDefinition) error + func (c *Connection) QueryPeers() error + func (c *Connection) RemoveObjAttributes(objID, attrName string, values []string) error + func (c *Connection) RollDice(to []string, rollspec string) error + func (c *Connection) RollDiceToAll(rollspec string) error + func (c *Connection) RollDiceToGM(rollspec string) error + func (c *Connection) Subscribe(ch chan MessagePayload, messages ...ServerMessage) error + func (c *Connection) Sync() error + func (c *Connection) SyncChat(target int) error + func (c *Connection) UpdateObjAttributes(objID string, newAttrs map[string]interface{}) error + func (c *Connection) WriteOnly() error + type Coordinates struct + X float64 + Y float64 + type CreatureHealth struct + Con int + Condition string + HpBlur int + IsFlatFooted bool + IsStable bool + LethalDamage int + MaxHP int + NonLethalDamage int + type CreatureToken struct + AoE *RadiusAoE + Area string + Color string + CreatureType byte + Dim bool + Elev int + Gx float64 + Gy float64 + Health *CreatureHealth + Killed bool + MoveMode byte + Name string + Note string + Reach bool + Size string + Skin int + SkinSize []string + StatusList []string + type DieRollPreset struct + Description string + DieRollSpec string + Name string + type ErrorMessagePayload struct + Error error + OriginalMessageType ServerMessage + type FileDefinition struct + File string + IsLocalFile bool + type ImageDefinition struct + File string + IsLocalFile bool + Name string + Zoom float64 + type InitiativeSlot struct + CurrentHP int + HasReadiedAction bool + IsFlatFooted bool + IsHolding bool + Name string + Slot int + type LineElement struct + Arrow byte + type LoadFromMessagePayload struct + CacheOnly bool + Merge bool + type LoadObjectMessagePayload struct + type MapElement struct + Dash byte + Fill string + Group string + Hidden bool + Layer string + Level int + Line string + Locked bool + Points []Coordinates + Width int + Z int + type MapObject interface + ObjID func() string + type MarcoMessagePayload struct + type MarkMessagePayload struct + type MessagePayload interface + MessageType func() ServerMessage + RawMessage func() []string + type MonsterToken struct + type Peer struct + Addr string + Client string + IsAuthenticated bool + IsMain bool + IsMe bool + IsWriteOnly bool + LastPolo float64 + User string + type PlaceSomeoneMessagePayload struct + type PlayerToken struct + type PolygonElement struct + Join byte + Spline float64 + type QueryImageMessagePayload struct + type RadiusAoE struct + Color string + Radius float64 + type RectangleElement struct + type RemoveObjAttributesMessagePayload struct + AttrName string + ObjID string + Values []string + type RollResultMessagePayload struct + Result dice.StructuredResult + Title string + type ServerMessage byte + type SpellAreaOfEffectElement struct + AoEShape byte + type StatusMarkerDefinition struct + Color string + Condition string + Shape string + func (c StatusMarkerDefinition) Text() string + type StatusMarkerDefinitions map[string]StatusMarkerDefinition + func (cs StatusMarkerDefinitions) Text() string + type TextElement struct + Anchor byte + Font TextFont + Text string + type TextFont struct + Family string + Size float64 + Slant byte + Weight byte + type TileElement struct + BBHeight float64 + BBWidth float64 + Image string + type ToolbarMessagePayload struct + Enabled bool + type UnknownMessagePayload struct + type UpdateClockMessagePayload struct + Absolute float64 + Relative float64 + type UpdateDicePresetsMessagePayload struct + Presets []DieRollPreset + type UpdateInitiativeMessagePayload struct + InitiativeList []InitiativeSlot + type UpdateObjAttributesMessagePayload struct + NewAttrs map[string]interface{} + ObjID string + type UpdatePeerListMessagePayload struct + PeerList []Peer + type UpdateProgressMessagePayload struct + IsDone bool + MaxValue int + OperationID string + Title string + Value int + type UpdateStatusMarkerMessagePayload struct + type UpdateTurnMessagePayload struct + ActorID string + Count int + Hours int + Minutes int + Rounds int + Seconds int Other modules containing this package github.com/MadScienceZone/go-gma/v5