api

package
v0.0.0-...-60cd5c1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const SkypeSpacesEndpoint = "https://api.teams.skype.com"
View Source
const TEAMS_API_ENDPOINT = "https://teams.microsoft.com/api"

Variables

This section is empty.

Functions

func AuthString

func AuthString(token *TeamsToken) string

Types

type AuthClient

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

func New

func New(client *http.Client) AuthClient

func (AuthClient) Authz

func (a AuthClient) Authz(token *RootSkypeToken, authzType AuthzType) (*SkypeToken, error)

type AuthzError

type AuthzError struct {
	ErrorCode AuthzErrorCode `json:"errorCode"`
	Message   string         `json:"message"`
}

func (AuthzError) Error

func (a AuthzError) Error() string

type AuthzErrorCode

type AuthzErrorCode string
const (
	GuestUserNotRedeemed AuthzErrorCode = "GuestUserNotRedeemed"
)

type AuthzResponse

type AuthzResponse struct {
	Tokens         Tokens         `json:"tokens"`
	Region         Region         `json:"region"`
	Partition      Partition      `json:"partition"`
	RegionGtms     RegionGTMs     `json:"regionGtms"`
	RegionSettings RegionSettings `json:"regionSettings"`
	LicenseDetails LicenseDetails
}

type AuthzType

type AuthzType = string
const (
	AuthzRefresh AuthzType = "TokenRefresh"
)

type LicenseDetails

type LicenseDetails struct {
	IsFreemium               bool
	IsBasicLiveEventsEnabled bool
	IsTrial                  bool
	IsAdvComms               bool
}

type Partition

type Partition string
const (
	Emea1 Partition = "emea01"
)

type Region

type Region string
const (
	Emea Region = "emea"
)

type RegionGTMs

type RegionGTMs struct {
	Ams                                 string `json:"ams"`
	AmsV2                               string `json:"amsV2"`
	AmdS2S                              string `json:"amdS2S"`
	AmsS2S                              string `json:"amsS2S"`
	AppsDataLayerService                string `json:"appsDataLayerService"`
	AppsDataLayerServiceS2S             string `json:"appsDataLayerServiceS2S"`
	CallingCallControllerServiceURL     string `json:"calling_callControllerServiceUrl"`
	CallingCallStoreUrl                 string `json:"calling_callStoreUrl"`
	CallingConversationServiceURL       string `json:"calling_conversationServiceUrl"`
	CallingKeyDistributionUrl           string `json:"calling_keyDistributionUrl"`
	CallingPotentialCallRequestUrl      string `json:"calling_potentialCallRequestUrl"`
	CallingSharedLineOptionsUrl         string `json:"calling_sharedLineOptionsUrl"`
	CallingUdpTransportUrl              string `json:"calling_udpTransportUrl"`
	CallingUploadLogRequestUrl          string `json:"calling_uploadLogRequestUrl"`
	CallingS2SBroker                    string `json:"callingS2S_Broker"`
	CallingS2SCallController            string `json:"callingS2S_CallController"`
	CallingS2SCallStore                 string `json:"callingS2S_CallStore"`
	CallingS2SContentSharing            string `json:"callingS2S_ContentSharing"`
	CallingS2SConversationService       string `json:"callingS2S_ConversationService"`
	CallingS2SEnterpriseProxy           string `json:"callingS2S_EnterpriseProxy"`
	CallingS2SMediaController           string `json:"callingS2S_MediaController"`
	CallingS2SPlatformMediaAgent        string `json:"callingS2S_PlatformMediaAgent"`
	ChatService                         string `json:"chatService"`
	ChatServiceAggregator               string `json:"chatServiceAggregator"`
	ChatServiceS2S                      string `json:"chatServiceS2S"`
	Drad                                string `json:"drad"`
	MailHookS2S                         string `json:"mailhookS2S"`
	MiddleTier                          string `json:"middleTier"`
	MiddleTierS2S                       string `json:"middleTierS2S"`
	MtImageService                      string `json:"mtImageService"`
	PowerPointStateService              string `json:"powerPointStateService"`
	Search                              string `json:"search"`
	SearchTelemetry                     string `json:"searchTelemetry"`
	TeamsAndChannelsService             string `json:"teamsAndChannelsService"`
	TeamsAndChannelsProvisioningService string `json:"teamsAndChannelsProvisioningService"`
	Urlp                                string `json:"urlp"`
	UrlpV2                              string `json:"urlpV2"`
	UnifiedPresence                     string `json:"unifiedPresence"`
	UserEntitlementService              string `json:"userEntitlementService"`
	UserIntelligenceService             string `json:"userIntelligenceService"`
	UserProfileService                  string `json:"userProfileService"`
	UserProfileServiceS2S               string `json:"userProfileServiceS2S"`
}

type RegionSettings

type RegionSettings struct {
	IsUnifiedPresenceEnabled        bool
	IsOutOfOfficeIntegrationEnabled bool
	IsContactMigrationEnabled       bool
	IsAppsDiscoveryEnabled          bool
	IsFederationEnabled             bool
}

type RootSkypeToken

type RootSkypeToken = TeamsToken

func GetRootToken

func GetRootToken() (*RootSkypeToken, error)

type SkypeSpaceSvc

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

func NewSkypeSpaceService

func NewSkypeSpaceService(token *SkypeToken) SkypeSpaceSvc

func (SkypeSpaceSvc) GetTenants

func (s SkypeSpaceSvc) GetTenants() ([]models.Tenant, error)

type SkypeToken

type SkypeToken = TeamsToken

func GetSkypeSpacesToken

func GetSkypeSpacesToken() (*SkypeToken, error)

func GetSkypeToken

func GetSkypeToken() (*SkypeToken, error)

type TeamsToken

type TeamsToken struct {
	Inner *jwt.Token
	Type  TeamsTokenType
}

func GetChatSvcAggToken

func GetChatSvcAggToken() (*TeamsToken, error)

func GetTeamsToken

func GetTeamsToken() (*TeamsToken, error)

type TeamsTokenType

type TeamsTokenType string
const (
	TokenSkype  TeamsTokenType = "skypetoken"
	TokenBearer TeamsTokenType = "Bearer"
)

type Tokens

type Tokens struct {
	SkypeToken string `json:"skypeToken"`
	ExpiresIn  int    `json:"expiresIn"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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