azure

package
v0.0.0-...-bdcecd3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultContext

func DefaultContext(timeout time.Duration) (context.Context, context.CancelFunc)

DefaultContext returns a context that will time out. Remember to call CancelFunc when you are done.

func Teams

func Teams(ctx context.Context) (map[string]Team, error)

Teams retrieves the canonical list of team groups from the Microsoft Graph API.

Types

type GraphAPI

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

func NewGraphAPI

func NewGraphAPI(client *http.Client) *GraphAPI

func (*GraphAPI) GroupsFromApplication

func (g *GraphAPI) GroupsFromApplication(appID string) ([]Group, error)

Retrieve a list of Azure Groups that are given access to a specific Azure Application.

type Group

type Group struct {
	ID           string `json:"id"`
	DisplayName  string `json:"displayName"`
	MailNickname string `json:"mailNickname"`
}

type GroupList

type GroupList struct {
	Value []Group
}

type ServicePrincipal

type ServicePrincipal struct {
	PrincipalID   string `json:"principalId"`
	PrincipalType string `json:"principalType"`
}

type ServicePrincipalList

type ServicePrincipalList struct {
	NextLink string             `json:"@odata.nextLink"`
	Value    []ServicePrincipal `json:"value"`
}

type Team

type Team struct {
	AzureUUID   string
	ID          string
	Title       string
	Description string
}

func (Team) Valid

func (team Team) Valid() bool

Valid returns true if the ID fields are non-empty.

Jump to

Keyboard shortcuts

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