Help us shape the future of Go! Take the 2026 Go Developer Survey

graphhelper

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphHelper

type GraphHelper struct {
	Logger *Logger
	// contains filtered or unexported fields
}

func NewGraphHelper

func NewGraphHelper(clientId, tenantId, clientSecret string, logger *Logger) (*GraphHelper, error)

func (*GraphHelper) CreateFolder

func (g *GraphHelper) CreateFolder(ctx context.Context, driveID, driveItemID, folderName string) (models.DriveItemable, error)

func (*GraphHelper) CreateUploadSession

func (g *GraphHelper) CreateUploadSession(ctx context.Context, driveID, itemPath string) (models.UploadSessionable, error)

CreateUploadSession creates a session to upload an item to the specified drive. If no item exists at the path specified by itemPath, a new item will be created.

func (*GraphHelper) DeleteDriveItem

func (g *GraphHelper) DeleteDriveItem(ctx context.Context, driveID, driveItemID string) error

func (*GraphHelper) DownloadDriveItem

func (g *GraphHelper) DownloadDriveItem(ctx context.Context, driveID, driveItemID string) ([]byte, error)

func (*GraphHelper) GetAppToken

func (g *GraphHelper) GetAppToken(ctx context.Context) (azcore.AccessToken, error)

func (*GraphHelper) GetDriveItem

func (g *GraphHelper) GetDriveItem(ctx context.Context, driveID, driveItemID string) (models.DriveItemable, error)

func (*GraphHelper) GetDriveRootItems

func (g *GraphHelper) GetDriveRootItems(ctx context.Context, driveID string) ([]models.DriveItemable, error)

func (*GraphHelper) GetSiteByName

func (g *GraphHelper) GetSiteByName(ctx context.Context, siteName string) ([]models.Siteable, error)

func (*GraphHelper) UploadFile

func (g *GraphHelper) UploadFile(uploadSession models.UploadSessionable, byteStream *os.File) (models.DriveItemable, error)

type Logger

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

func NewDefaultLogger

func NewDefaultLogger(logger *zap.Logger) *Logger

func (*Logger) Debugf

func (zl *Logger) Debugf(format string, v ...interface{})

func (*Logger) Errorf

func (zl *Logger) Errorf(format string, v ...interface{})

func (*Logger) Infof

func (zl *Logger) Infof(format string, v ...interface{})

func (*Logger) Warnf

func (zl *Logger) Warnf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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