britive

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrNotFound - godoc
	ErrNotFound  = errors.New("could not find")
	ErrNoContent = errors.New("no content")
)

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 {
	APIBaseURL string
	HTTPClient *http.Client
	Token      string
	Version    string
	SyncMap    *sync.Map
}

Client - Britive API client

func NewClient

func NewClient(apiBaseURL, token, version string) (*Client, error)

NewClient - Initializes 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) CreateProfileSessionAttribute added in v1.0.13

func (c *Client) CreateProfileSessionAttribute(profileID string, sessionAttribute SessionAttribute) (*SessionAttribute, error)

CreateProfileSessionAttribute - Create new profile session attribute

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) DeleteProfileSessionAttribute added in v1.0.13

func (c *Client) DeleteProfileSessionAttribute(profileID string, sessionAttributeID string) error

DeleteTag - Delete tag

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) Do added in v1.0.13

func (c *Client) Do(req *http.Request) ([]byte, error)

Do - Perform Britive API call

func (*Client) DoWithLock added in v1.0.13

func (c *Client) DoWithLock(req *http.Request, key string) ([]byte, error)

DoWithLock - Perform Britive API call with lock

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) GetAttribute added in v1.0.13

func (c *Client) GetAttribute(attributeID string) (*UserAttribute, error)

GetAttribute - Returns a specifc attribute by id

func (*Client) GetAttributeByName added in v1.0.13

func (c *Client) GetAttributeByName(name string) (*UserAttribute, error)

GetAttributeByName - Returns a specifc user attribute by name

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 profile

func (*Client) GetProfileAssociationResource added in v1.0.13

func (c *Client) GetProfileAssociationResource(profileID string, name string, parentName string) (*ProfileAssociationResource, error)

GetProfileAssociationResource - Returns a all associations linked with profile

func (*Client) GetProfileAssociationResourceByNativeID added in v1.0.13

func (c *Client) GetProfileAssociationResourceByNativeID(profileID string, nativeID string) (*ProfileAssociationResource, error)

GetProfileAssociationResourceByNativeID - 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) 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 profile

func (*Client) GetProfileSessionAttribute added in v1.0.13

func (c *Client) GetProfileSessionAttribute(profileID string, sessionAttributeID string) (*SessionAttribute, error)

GetProfileSessionAttributes - Returns profile session attributes

func (*Client) GetProfileSessionAttributeByTypeAndMappingName added in v1.0.14

func (c *Client) GetProfileSessionAttributeByTypeAndMappingName(profileID, attributeType, mappingName string) (*SessionAttribute, error)

GetProfileSessionAttributeByTypeAndMappingName - Returns profile session attributes

func (*Client) GetProfileSessionAttributes added in v1.0.13

func (c *Client) GetProfileSessionAttributes(profileID string) (*[]SessionAttribute, error)

GetProfileSessionAttributes - Returns profile session attributes

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 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) 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) NewQueryRequest added in v1.0.13

func (c *Client) NewQueryRequest() *QueryRequest

NewQueryRequest - godoc

func (*Client) SaveProfileAssociationResourceScopes added in v1.0.9

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

SaveProfileAssociationResourceScopes - Save profile associations

func (*Client) SaveProfileAssociationScopes added in v1.0.9

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

SaveProfileAssociationScopes - 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) UpdateProfileSessionAttribute added in v1.0.13

func (c *Client) UpdateProfileSessionAttribute(profileID string, sessionAttribute SessionAttribute) (*SessionAttribute, error)

UpdateProfileSessionAttribute - Update profile session attribute

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 {
	Tenant string `json:"tenant"`
	Token  string `json:"token"`
}

Config - godoc

type HTTPErrorResponse added in v1.0.13

type HTTPErrorResponse struct {
	Status    int64       `json:"status"`
	Message   string      `json:"message"`
	ErrorCode string      `json:"errorCode"`
	Details   interface{} `json:"details"`
}

HTTPErrorResponse - 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 PaginationResponse added in v1.0.13

type PaginationResponse struct {
	Count  int           `json:"count"`
	Page   int           `json:"page"`
	Size   int           `json:"size"`
	Sort   string        `json:"sort,omitempty"`
	Filter string        `json:"filter,omitempty"`
	Data   []interface{} `json:"data"`
}

PaginationResponse - 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"`
	DestinationUrl                string               `json:"destinationUrl,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 ProfileAssociationResource added in v1.0.9

type ProfileAssociationResource struct {
	ID          int64       `json:"id,omitempty"`
	Name        string      `json:"name"`
	Description interface{} `json:"description,omitempty"`
	NativeID    string      `json:"nativeId,omitempty"`
	ParentID    string      `json:"parentId,omitempty"`
	ParentName  string      `json:"parentName,omitempty"`
	Type        string      `json:"type,omitempty"`
}

ProfileAssociationResource - 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 QueryRequest added in v1.0.13

type QueryRequest struct {
	Client      *Client
	QueryParams map[string]string
	Lock        string
	Result      interface{}
}

QueryRequest - godoc

func (*QueryRequest) Query added in v1.0.13

func (gpr *QueryRequest) Query(endpoint string) error

Query - godoc

func (*QueryRequest) WithFilter added in v1.0.13

func (gpr *QueryRequest) WithFilter(filter string) *QueryRequest

WithFilter - godoc

func (*QueryRequest) WithLock added in v1.0.13

func (gpr *QueryRequest) WithLock(lock string) *QueryRequest

WithLock - godoc

func (*QueryRequest) WithQuery added in v1.0.13

func (gpr *QueryRequest) WithQuery(query string) *QueryRequest

WithQuery - godoc

func (*QueryRequest) WithResult added in v1.0.13

func (gpr *QueryRequest) WithResult(result interface{}) *QueryRequest

WithResult - godoc

func (*QueryRequest) WithSize added in v1.0.13

func (gpr *QueryRequest) WithSize(size int) *QueryRequest

WithSize - godoc

func (*QueryRequest) WithSort added in v1.0.13

func (gpr *QueryRequest) WithSort(name string, direction SortDirection) *QueryRequest

WithSort - godoc

type SessionAttribute added in v1.0.13

type SessionAttribute struct {
	AttributeSchemaID    string `json:"attributeSchemaId"`
	MappingName          string `json:"mappingName"`
	Transitive           bool   `json:"transitive"`
	SessionAttributeType string `json:"sessionAttributeType"`
	AttributeValue       string `json:"attributeValue"`
	ID                   string `json:"id,omitempty"`
}

SessionAttribute - godoc

type SortDirection added in v1.0.13

type SortDirection string

SortDirection - godoc

const (
	//SortDirectionAscending - godoc
	SortDirectionAscending SortDirection = "asc"
	//SortDirectionDescending - godoc
	SortDirectionDescending SortDirection = "desc"
)

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 UserAttribute added in v1.0.13

type UserAttribute struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	DataType    string `json:"dataType"`
	MultiValued bool   `json:"multiValued"`
	BuiltIn     bool   `json:"builtIn"`
}

UserAttribute - 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