its

package
v0.0.0-...-1b842a1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterceptV1Path

func InterceptV1Path(pathParts ...string) *gock.Request

func V1APIURLPath

func V1APIURLPath(parts ...string) string

Types

type IDs

type IDs struct {
	Provider          idname.Provider
	ID                string
	Email             string
	DisplayName       string
	DriveID           string
	DriveRootFolderID string
	WebURL            string
	// TestContainerID is used to store the ID of the primary container under
	// test.  Normally this will be empty, but in certain services or data
	// categories, especially those where we don't have canonical containers
	// to isolate for testing, we may specify a TestContainer here instead.
	TestContainerID string
	// a "RootSite" is used by resources that own one or more sites.
	// ex: groups and teams.  Each of those resources should designate
	// a "root" site (aka: the "default" site).  That site gets embedded
	// here because we probably interface with it as its own resource
	// within the drive processors.
	RootSite struct {
		Provider          idname.Provider
		ID                string
		DisplayName       string
		DriveID           string
		DriveRootFolderID string
		WebURL            string
	}
}

type M365IntgTestSetup

type M365IntgTestSetup struct {
	Acct     account.Account
	Creds    account.M365Config
	TenantID string

	AC     api.Client
	GockAC api.Client

	Site          IDs
	SecondarySite IDs

	Group          IDs
	SecondaryGroup IDs

	User          IDs
	SecondaryUser IDs
	TertiaryUser  IDs
}

M365IntgTestSetup provides all the common references used in an m365 integration test suite. Call `its.GetM365()` to get the singleton for your test suite. If you're looking for unit testing setup, use `uts.GetM365()` instead.

func GetM365

func GetM365(t *testing.T) M365IntgTestSetup

GetM365 returns the populated its.m365 singleton.

type ResourceServicer

type ResourceServicer interface {
	Resource() IDs
	Service() path.ServiceType
}

func NewResourceService

func NewResourceService(r IDs, s path.ServiceType) ResourceServicer

Jump to

Keyboard shortcuts

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