mo_device

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeviceTypeWeb     = "web_session"
	DeviceTypeDesktop = "desktop_client"
	DeviceTypeMobile  = "mobile_client"
)

Variables

This section is empty.

Functions

func TestDeviceSession

func TestDeviceSession(t *testing.T)

Types

type Desktop

type Desktop struct {
	Raw json.RawMessage
	// Pseudo field for identify type of session.
	// This field is not appear in API definition.
	// "web_session", "desktop_client", or "mobile_client".
	Tag string `path:"-" json:"tag"`

	// Pseudo field for identify member.
	// This field should appear parent of session data.
	TeamMemberId string `path:"-" json:"team_member_id"`

	Id                        string `path:"session_id" json:"id"`
	HostName                  string `path:"host_name" json:"host_name"`
	ClientType                string `path:"client_type.\\.tag" json:"client_type"`
	ClientVersion             string `path:"client_version" json:"client_version"`
	Platform                  string `path:"platform" json:"platform"`
	IsDeleteOnUnlinkSupported bool   `path:"is_delete_on_unlink_supported" json:"is_delete_on_unlink_supported"`
	IpAddress                 string `path:"ip_address" json:"ip_address"`
	Country                   string `path:"country" json:"country"`
	Created                   string `path:"created" json:"created"`
	Updated                   string `path:"updated" json:"updated"`
}

func (*Desktop) CreatedAt

func (z *Desktop) CreatedAt() string

func (*Desktop) Desktop

func (z *Desktop) Desktop() (desktop *Desktop, e bool)

func (*Desktop) EntryRaw

func (z *Desktop) EntryRaw() json.RawMessage

func (*Desktop) EntryTag

func (z *Desktop) EntryTag() string

func (*Desktop) EntryTeamMemberId

func (z *Desktop) EntryTeamMemberId() string

func (*Desktop) Mobile

func (z *Desktop) Mobile() (mobile *Mobile, e bool)

func (*Desktop) SessionCountry

func (z *Desktop) SessionCountry() string

func (*Desktop) SessionIPAddress

func (z *Desktop) SessionIPAddress() string

func (*Desktop) SessionId

func (z *Desktop) SessionId() string

func (*Desktop) UpdatedAt

func (z *Desktop) UpdatedAt() string

func (*Desktop) Web

func (z *Desktop) Web() (web *Web, e bool)

type MemberSession

type MemberSession struct {
	Raw                       json.RawMessage
	TeamMemberId              string `path:"profile.team_member_id" json:"team_member_id"`
	Email                     string `path:"profile.email" json:"email"`
	Status                    string `path:"profile.status.\\.tag" json:"status"`
	GivenName                 string `path:"profile.name.given_name" json:"given_name"`
	Surname                   string `path:"profile.name.surname" json:"surname"`
	FamiliarName              string `path:"profile.name.familiar_name" json:"familiar_name"`
	DisplayName               string `path:"profile.name.display_name" json:"display_name"`
	AbbreviatedName           string `path:"profile.name.abbreviated_name" json:"abbreviated_name"`
	ExternalId                string `path:"profile.external_id" json:"external_id"`
	AccountId                 string `path:"profile.account_id" json:"account_id"`
	DeviceTag                 string `path:"device_tag" json:"device_tag"`
	Id                        string `path:"session.session_id" json:"id"`
	UserAgent                 string `path:"session.user_agent" json:"user_agent"`
	Os                        string `path:"session.os" json:"os"`
	Browser                   string `path:"session.browser" json:"browser"`
	IpAddress                 string `path:"session.ip_address" json:"ip_address"`
	Country                   string `path:"session.country" json:"country"`
	Created                   string `path:"session.created" json:"created"`
	Updated                   string `path:"session.updated" json:"updated"`
	Expires                   string `path:"session.expires" json:"expires"`
	HostName                  string `path:"session.host_name" json:"host_name"`
	ClientType                string `path:"session.client_type.\\.tag" json:"client_type"`
	ClientVersion             string `path:"session.client_version" json:"client_version"`
	Platform                  string `path:"session.platform" json:"platform"`
	IsDeleteOnUnlinkSupported bool   `path:"session.is_delete_on_unlink_supported" json:"is_delete_on_unlink_supported"`
	DeviceName                string `path:"session.device_name" json:"device_name"`
	OsVersion                 string `path:"session.os_version" json:"os_version"`
	LastCarrier               string `path:"session.last_carrier" json:"last_carrier"`
}

func NewMemberSession

func NewMemberSession(member *mo_member.Member, session Session) *MemberSession

func (*MemberSession) Session

func (z *MemberSession) Session() Session

type Metadata

type Metadata struct {
	Raw json.RawMessage
	// Pseudo field for identify type of session.
	// This field is not appear in API definition.
	// "web_session", "desktop_client", or "mobile_client".
	Tag string `path:"-" json:"tag"`

	// Pseudo field for identify member.
	// This field should appear parent of session data.
	TeamMemberId string `path:"-" json:"team_member_id"`
	Id           string `path:"session_id" json:"id"`
	IpAddress    string `path:"ip_address" json:"ip_address"`
	Country      string `path:"country" json:"country"`
	Created      string `path:"created" json:"created"`
	Updated      string `path:"updated" json:"updated"`
}

func (*Metadata) CreatedAt

func (z *Metadata) CreatedAt() string

func (*Metadata) Desktop

func (z *Metadata) Desktop() (desktop *Desktop, e bool)

func (*Metadata) EntryRaw

func (z *Metadata) EntryRaw() json.RawMessage

func (*Metadata) EntryTag

func (z *Metadata) EntryTag() string

func (*Metadata) EntryTeamMemberId

func (z *Metadata) EntryTeamMemberId() string

func (*Metadata) Mobile

func (z *Metadata) Mobile() (mobile *Mobile, e bool)

func (*Metadata) SessionCountry

func (z *Metadata) SessionCountry() string

func (*Metadata) SessionIPAddress

func (z *Metadata) SessionIPAddress() string

func (*Metadata) SessionId

func (z *Metadata) SessionId() string

func (*Metadata) UpdatedAt

func (z *Metadata) UpdatedAt() string

func (*Metadata) Web

func (z *Metadata) Web() (web *Web, e bool)

type Mobile

type Mobile struct {
	Raw json.RawMessage
	// Pseudo field for identify type of session.
	// This field is not appear in API definition.
	// "web_session", "desktop_client", or "mobile_client".
	Tag string `path:"-" json:"tag"`

	// Pseudo field for identify member.
	// This field should appear parent of session data.
	TeamMemberId string `path:"-" json:"team_member_id"`

	Id            string `path:"session_id" json:"id"`
	DeviceName    string `path:"device_name" json:"device_name"`
	ClientType    string `path:"client_type.\\.tag" json:"client_type"`
	IpAddress     string `path:"ip_address" json:"ip_address"`
	Country       string `path:"country" json:"country"`
	Created       string `path:"created" json:"created"`
	Updated       string `path:"updated" json:"updated"`
	ClientVersion string `path:"client_version" json:"client_version"`
	OsVersion     string `path:"os_version" json:"os_version"`
	LastCarrier   string `path:"last_carrier" json:"last_carrier"`
}

func (*Mobile) CreatedAt

func (z *Mobile) CreatedAt() string

func (*Mobile) Desktop

func (z *Mobile) Desktop() (desktop *Desktop, e bool)

func (*Mobile) EntryRaw

func (z *Mobile) EntryRaw() json.RawMessage

func (*Mobile) EntryTag

func (z *Mobile) EntryTag() string

func (*Mobile) EntryTeamMemberId

func (z *Mobile) EntryTeamMemberId() string

func (*Mobile) Mobile

func (z *Mobile) Mobile() (mobile *Mobile, e bool)

func (*Mobile) SessionCountry

func (z *Mobile) SessionCountry() string

func (*Mobile) SessionIPAddress

func (z *Mobile) SessionIPAddress() string

func (*Mobile) SessionId

func (z *Mobile) SessionId() string

func (*Mobile) UpdatedAt

func (z *Mobile) UpdatedAt() string

func (*Mobile) Web

func (z *Mobile) Web() (web *Web, e bool)

type Session

type Session interface {
	EntryRaw() json.RawMessage

	// Pseudo field for identify type of session.
	// This field is not appear in API definition.
	// "web_session", "desktop_client", or "mobile_client".
	EntryTag() string

	// Pseudo field for identify member.
	// This field should appear parent of session data.
	EntryTeamMemberId() string
	SessionId() string
	CreatedAt() string
	UpdatedAt() string
	SessionIPAddress() string
	SessionCountry() string

	Web() (web *Web, e bool)
	Desktop() (desktop *Desktop, e bool)
	Mobile() (mobile *Mobile, e bool)
}

type Web

type Web struct {
	Raw json.RawMessage

	// Pseudo field for identify type of session.
	// This field is not appear in API definition.
	// "web_session", "desktop_client", or "mobile_client".
	Tag string `path:"-" json:"tag"`

	// Pseudo field for identify member.
	// This field should appear parent of session data.
	TeamMemberId string `path:"-" json:"team_member_id"`

	Id        string `path:"session_id" json:"id"`
	UserAgent string `path:"user_agent" json:"user_agent"`
	Os        string `path:"os" json:"os"`
	Browser   string `path:"browser" json:"browser"`
	IpAddress string `path:"ip_address" json:"ip_address"`
	Country   string `path:"country" json:"country"`
	Created   string `path:"created" json:"created"`
	Updated   string `path:"updated" json:"updated"`
	Expires   string `path:"expires" json:"expires"`
}

func (*Web) CreatedAt

func (z *Web) CreatedAt() string

func (*Web) Desktop

func (z *Web) Desktop() (desktop *Desktop, e bool)

func (*Web) EntryRaw

func (z *Web) EntryRaw() json.RawMessage

func (*Web) EntryTag

func (z *Web) EntryTag() string

func (*Web) EntryTeamMemberId

func (z *Web) EntryTeamMemberId() string

func (*Web) Mobile

func (z *Web) Mobile() (mobile *Mobile, e bool)

func (*Web) SessionCountry

func (z *Web) SessionCountry() string

func (*Web) SessionIPAddress

func (z *Web) SessionIPAddress() string

func (*Web) SessionId

func (z *Web) SessionId() string

func (*Web) UpdatedAt

func (z *Web) UpdatedAt() string

func (*Web) Web

func (z *Web) Web() (web *Web, e bool)

Jump to

Keyboard shortcuts

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