m365

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewM365Client

func NewM365Client(
	ctx context.Context,
	acct account.Account,
	opts ...graph.Option,
) (client, error)

Types

type Group

type Group struct {
	ID string

	// DisplayName is the human-readable name of the group.  Normally the plaintext name that the
	// user provided when they created the group, or the updated name if it was changed.
	// Ex: displayName: "My Group"
	DisplayName string

	// IsTeam is true if the group qualifies as a Teams resource, and is able to backup and restore
	// teams data.
	IsTeam bool
}

Group is the minimal information required to identify and display a M365 Group.

type Site

type Site struct {
	// WebURL is the url for the site, works as an alias for the user name.
	WebURL string

	// ID is of the format: <site collection hostname>.<site collection unique id>.<site unique id>
	// for example: contoso.sharepoint.com,abcdeab3-0ccc-4ce1-80ae-b32912c9468d,xyzud296-9f7c-44e1-af81-3c06d0d43007
	ID string

	// DisplayName is the human-readable name of the site.  Normally the plaintext name that the
	// user provided when they created the site, though it can be changed across time.
	// Ex: webUrl: https://host.com/sites/TestingSite, displayName: "Testing Site"
	DisplayName string

	OwnerType SiteOwnerType
	// OwnerID may or may not contain the site owner's ID.
	// Requires:
	// * a discoverable site owner type
	// * getByID (the drive expansion doesn't work on paginated data)
	// * lucky chance (not all responses contain an owner ID)
	OwnerID string
	// OwnerEmail may or may not contain the site owner's email.
	OwnerEmail string
}

Site is the minimal information required to identify and display a SharePoint site.

func ParseSite

func ParseSite(ctx context.Context, item models.Siteable) *Site

ParseSite extracts the information from `models.Siteable` we care about

type SiteOwnerType

type SiteOwnerType string
const (
	SiteOwnerUnknown SiteOwnerType = "unknown"
	SiteOwnerUser    SiteOwnerType = "user"
	SiteOwnerGroup   SiteOwnerType = "group"
)

type UserNoInfo

type UserNoInfo struct {
	PrincipalName string
	ID            string
	Name          string
}

UserNoInfo is the minimal information required to identify and display a user. TODO(pandeyabs): Rename this to User now that `Info` support has been removed.

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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