britive

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminRole

type AdminRole struct {
	Name        string `json:"name,omitempty"`
	DisplayName string `json:"displayName,omitempty"`
}

AdminRole - godoc

type Application

type Application struct {
	AppContainerID        string `json:"appContainerId"`
	CatalogAppDisplayName string `json:"catalogAppDisplayName,omitempty"`
}

Application - godoc

type ApplicationRootEnvironmentGroup

type ApplicationRootEnvironmentGroup struct {
	EnvironmentGroups []Association `json:"environmentGroups,omitempty"`
	Environments      []Association `json:"environments,omitempty"`
}

ApplicationRootEnvironmentGroup - godoc

type Association

type Association struct {
	ID               string      `json:"id,omitempty"`
	Name             string      `json:"name"`
	Description      interface{} `json:"description,omitempty"`
	ParentID         string      `json:"parentId,omitempty"`
	ParentGroupID    string      `json:"parentGroupId,omitempty"`
	InternalParentID string      `json:"internalParentId,omitempty"`
	Type             string      `json:"type,omitempty"`
	Status           string      `json:"status,omitempty"`
}

Association - godoc

type Client

type Client struct {
	HostURL    string
	HTTPClient *http.Client
	Token      string
}

Client - Britive API client

func NewClient

func NewClient(host, token *string) (*Client, error)

NewClient - Initialises new Britive API client

func (*Client) CreateProfile

func (c *Client) CreateProfile(appContainerID string, profile Profile) (*Profile, error)

CreateProfile - Create new profile

func (*Client) CreateProfileIdentity

func (c *Client) CreateProfileIdentity(profileIdentity ProfileIdentity) (*ProfileIdentity, error)

CreateProfileIdentity - Add identity to profile

func (*Client) CreateProfileTag

func (c *Client) CreateProfileTag(profileTag ProfileTag) (*ProfileTag, error)

CreateProfileTag - Add tag to profile

func (*Client) CreateTag

func (c *Client) CreateTag(tag Tag) (*Tag, error)

CreateTag - Create new tag

func (*Client) CreateTagMember

func (c *Client) CreateTagMember(tagID string, userID string) error

CreateTagMember - Add member to tag

func (*Client) DeleteProfile

func (c *Client) DeleteProfile(appContainerID string, profileID string) error

DeleteProfile - Delete profile

func (*Client) DeleteProfileIdentity

func (c *Client) DeleteProfileIdentity(profileID string, userID string) error

DeleteProfileIdentity - Delete identity from the profile

func (*Client) DeleteProfileTag

func (c *Client) DeleteProfileTag(profileID string, tagID string) error

DeleteProfileTag - Delete tag from the profile

func (*Client) DeleteTag

func (c *Client) DeleteTag(tagID string) error

DeleteTag - Delete tag

func (*Client) DeleteTagMember

func (c *Client) DeleteTagMember(tagID string, userID string) error

DeleteTagMember - Delete member from the tag

func (*Client) EnableOrDisableProfile

func (c *Client) EnableOrDisableProfile(appContainerID string, profileID string, disabled bool) (*Profile, error)

EnableOrDisableProfile - Enable or Disable tag

func (*Client) EnableOrDisableTag

func (c *Client) EnableOrDisableTag(tagID string, disabled bool) (*Tag, error)

EnableOrDisableTag - Enable or Disable tag

func (*Client) ExecuteProfilePermissionRequest

func (c *Client) ExecuteProfilePermissionRequest(profileID string, ppr ProfilePermissionRequest) error

ExecuteProfilePermissionRequest - Add/delete permission from profile

func (*Client) GetApplication

func (c *Client) GetApplication(appContainerID string) (*Application, error)

GetApplication - Returns application by id

func (*Client) GetApplicationByName

func (c *Client) GetApplicationByName(name string) (*Application, error)

GetApplicationByName - Returns application by name

func (*Client) GetApplicationRootEnvironmentGroup

func (c *Client) GetApplicationRootEnvironmentGroup(appContainerID string) (*ApplicationRootEnvironmentGroup, error)

GetApplicationRootEnvironmentGroup - Returns root environment group

func (*Client) GetApplications

func (c *Client) GetApplications() (*[]Application, error)

GetApplications - Returns all applications

func (*Client) GetAssignedProfilePermissions

func (c *Client) GetAssignedProfilePermissions(profileID string) (*[]ProfilePermission, error)

GetAssignedProfilePermissions - Returns all permissions assigned to user profile

func (*Client) GetAssignedProfileTags

func (c *Client) GetAssignedProfileTags(profileID string) (*[]ProfileTag, error)

GetAssignedProfileTags - Returns all tags assigned to profile

func (*Client) GetAssignedTagMembers

func (c *Client) GetAssignedTagMembers(tagID string) (*[]User, error)

GetAssignedTagMembers - Returns all members assigned to tag

func (*Client) GetIdentityProvider

func (c *Client) GetIdentityProvider(identityProviderID string) (*IdentityProvider, error)

GetIdentityProvider - Returns identity provider

func (*Client) GetIdentityProviderByName

func (c *Client) GetIdentityProviderByName(name string) (*IdentityProvider, error)

GetIdentityProviderByName - Returns identity provider by name

func (*Client) GetIdentityProviders

func (c *Client) GetIdentityProviders() (*[]IdentityProvider, error)

GetIdentityProviders - Returns all identity providers

func (*Client) GetProfile

func (c *Client) GetProfile(profileID string) (*Profile, error)

GetProfile - Returns a specifc user profile

func (*Client) GetProfileAssociations

func (c *Client) GetProfileAssociations(profileID string) (*[]ProfileAssociation, error)

GetProfileAssociations - Returns a all associations linked with profile

func (*Client) GetProfileByName

func (c *Client) GetProfileByName(appContainerID string, name string) (*Profile, error)

GetProfileByName - Returns a specifc profile by name

func (*Client) GetProfileIdentities

func (c *Client) GetProfileIdentities(profileID string) (*[]ProfileIdentity, error)

GetProfileIdentities - Returns all identities assigned to profile

func (*Client) GetProfileIdentity

func (c *Client) GetProfileIdentity(profileID string, userID string) (*ProfileIdentity, error)

GetProfileIdentity - Returns a specifc identity from profile

func (*Client) GetProfilePermission

func (c *Client) GetProfilePermission(profileID string, profilePermission ProfilePermission) (*ProfilePermission, error)

GetProfilePermission - Returns a specifc permission associated with user profile

func (*Client) GetProfileTag

func (c *Client) GetProfileTag(profileID string, tagID string) (*ProfileTag, error)

GetProfileTag - Returns a specifc tag from profile

func (*Client) GetProfiles

func (c *Client) GetProfiles(appContainerID string) (*[]Profile, error)

GetProfiles - Returns all user profiles

func (*Client) GetTag

func (c *Client) GetTag(tagID string) (*Tag, error)

GetTag - Returns a specifc tag by id

func (*Client) GetTagByName

func (c *Client) GetTagByName(name string) (*Tag, error)

GetTagByName - Returns a specifc tag by name

func (*Client) GetTagMember

func (c *Client) GetTagMember(tagID string, userID string) (*User, error)

GetTagMember - Returns a specifc member assigned to tag

func (*Client) GetTags

func (c *Client) GetTags() (*[]Tag, error)

GetTags - Returns all tags

func (*Client) GetUser

func (c *Client) GetUser(userID string) (*User, error)

GetUser - Returns user by user id

func (*Client) GetUserByName

func (c *Client) GetUserByName(username string) (*User, error)

GetUserByName - Returns user by username

func (*Client) GetUsers

func (c *Client) GetUsers() (*[]User, error)

GetUsers - Returns all users

func (*Client) SaveProfileAssociations

func (c *Client) SaveProfileAssociations(profileID string, associations []ProfileAssociation) error

SaveProfileAssociations - Save profile associations

func (*Client) UpdateProfile

func (c *Client) UpdateProfile(appContainerID string, profileID string, profile Profile) (*Profile, error)

UpdateProfile - Updates profile

func (*Client) UpdateProfileIdentity

func (c *Client) UpdateProfileIdentity(profileIdentity ProfileIdentity) (*ProfileIdentity, error)

UpdateProfileIdentity - Update profile identity properties

func (*Client) UpdateProfileTag

func (c *Client) UpdateProfileTag(profileTag ProfileTag) (*ProfileTag, error)

UpdateProfileTag - Update profile tag attributes

func (*Client) UpdateTag

func (c *Client) UpdateTag(tagID string, tag Tag) (*Tag, error)

UpdateTag - Update tag

type Config

type Config struct {
	Host  string `json:"host"`
	Token string `json:"token"`
}

Config - godoc

type IdentityProvider

type IdentityProvider struct {
	ID          string `json:"id"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Type        string `json:"type,omitempty"`
}

IdentityProvider - godoc

type Profile

type Profile struct {
	ProfileID                     string               `json:"papId,omitempty"`
	AppContainerID                string               `json:"appContainerId"`
	Name                          string               `json:"name"`
	Description                   string               `json:"description"`
	Status                        string               `json:"status,omitempty"`
	Associations                  []ProfileAssociation `json:"scope,omitempty"`
	ExpirationDuration            int64                `json:"expirationDuration,omitempty"`
	Extendable                    bool                 `json:"extendable"`
	NotificationPriorToExpiration *int64               `json:"notificationPriorToExpiration,omitempty"`
	ExtensionDuration             *int64               `json:"extensionDuration,omitempty"`
	ExtensionLimit                interface{}          `json:"extensionLimit,omitempty"`
}

Profile - godoc

type ProfileAssociation

type ProfileAssociation struct {
	ProfileAssociationID interface{} `json:"papScopeId,omitempty"`
	Type                 string      `json:"type"`
	AppContainerID       interface{} `json:"appContainerId,omitempty"`
	Value                string      `json:"value"`
	ProfileID            string      `json:"papId,omitempty"`
}

ProfileAssociation - godoc

type ProfileIdentity

type ProfileIdentity struct {
	ProfileID    string      `json:"papId,omitempty"`
	UserID       string      `json:"userId,omitempty"`
	Name         string      `json:"name,omitempty"`
	Username     string      `json:"username,omitempty"`
	UserType     string      `json:"userType,omitempty"`
	Status       string      `json:"status,omitempty"`
	AccessPeriod *TimePeriod `json:"accessPeriod,omitempty"`
	CheckStatus  string      `json:"checkStatus,omitempty"`
	Message      string      `json:"message,omitempty"`
}

ProfileIdentity - godoc

type ProfilePermission

type ProfilePermission struct {
	ProfileID   string      `json:"papId,omitempty"`
	Name        string      `json:"name"`
	Type        string      `json:"type"`
	Description interface{} `json:"description,omitempty"`
	CheckStatus string      `json:"checkStatus,omitempty"`
	Message     string      `json:"message,omitempty"`
}

ProfilePermission - godoc

type ProfilePermissionRequest

type ProfilePermissionRequest struct {
	Operation  string            `json:"op"`
	Permission ProfilePermission `json:"permission"`
}

ProfilePermissionRequest - godoc

type ProfileTag

type ProfileTag struct {
	ProfileID    string      `json:"papId,omitempty"`
	TagID        string      `json:"userTagId,omitempty"`
	Name         string      `json:"name,omitempty"`
	Description  string      `json:"description,omitempty"`
	Status       string      `json:"status,omitempty"`
	UserCount    interface{} `json:"userCount,omitempty"`
	AccessPeriod *TimePeriod `json:"accessPeriod,omitempty"`
	CheckStatus  string      `json:"checkStatus,omitempty"`
	Message      string      `json:"message,omitempty"`
}

ProfileTag - godoc

type Tag

type Tag struct {
	ID                       string                    `json:"userTagId,omitempty"`
	Name                     string                    `json:"name"`
	Description              string                    `json:"description"`
	Status                   string                    `json:"status,omitempty"`
	UserTagIdentityProviders []UserTagIdentityProvider `json:"userTagIdentityProviders,omitempty"`
	External                 interface{}               `json:"external,omitempty"`
}

Tag - godoc

type TimePeriod

type TimePeriod struct {
	Start time.Time `json:"start"`
	End   time.Time `json:"end"`
}

TimePeriod - godoc

type User

type User struct {
	AdminRoles       []AdminRole      `json:"adminRoles,omitempty"`
	Type             string           `json:"type,omitempty"`
	Email            string           `json:"email,omitempty"`
	Username         string           `json:"username,omitempty"`
	FirstName        string           `json:"firstName,omitempty"`
	LastName         string           `json:"lastName,omitempty"`
	Name             string           `json:"name,omitempty"`
	ExternalID       interface{}      `json:"externalId,omitempty"`
	Mobile           interface{}      `json:"mobile,omitempty"`
	IdentityProvider IdentityProvider `json:"identityProvider,omitempty"`
	MappedAccounts   []interface{}    `json:"mappedAccounts,omitempty"`
	External         bool             `json:"external,omitempty"`
	Status           string           `json:"status,omitempty"`
	UserID           string           `json:"userId,omitempty"`
}

User - godoc

type UserTagIdentityProvider

type UserTagIdentityProvider struct {
	IdentityProvider IdentityProvider `json:"identityProvider"`
	ExternalID       interface{}      `json:"externalId,omitempty"`
}

UserTagIdentityProvider - godoc

Jump to

Keyboard shortcuts

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