Versions in this module Expand all Collapse all v0 v0.1.0 Jul 16, 2026 Changes in this version + const DefaultConnectionStringKey + const DefaultEmailKey + const DefaultMyceliumRoleKey + const DefaultProfileKey + const DefaultRequestIDKey + const DefaultScopeKey + const DefaultTenantIDKey + func CompressAndEncodeProfileToBase64(p *Profile) (string, error) + type DecodeOption func(*decodeConfig) + func WithStrict(strict bool) DecodeOption + type InsufficientLicensesError struct + func NewInsufficientLicensesError(message string) *InsufficientLicensesError + func (e *InsufficientLicensesError) Unwrap() error + type InsufficientPrivilegesError struct + FilteringState []string + func NewInsufficientPrivilegesError(message string, filteringState []string) *InsufficientPrivilegesError + func (e *InsufficientPrivilegesError) Unwrap() error + type LicensedResource struct + AccID uuid.UUID + AccName string + DenyFlags *[]string + Perm Permission + PermitFlags *[]string + Role string + RoleID uuid.UUID + SysAcc bool + TenantID uuid.UUID + Verified bool + func LicensedResourceFromString(value string) (LicensedResource, error) + func (r LicensedResource) String() string + type LicensedResources struct + Records []LicensedResource + Urls []string + func (lr *LicensedResources) UnmarshalJSON(data []byte) error + func (lr LicensedResources) MarshalJSON() ([]byte, error) + func (lr LicensedResources) ToLicensesVector() []LicensedResource + type MyceliumError struct + Code string + ExpTrue bool + Message string + func (e *MyceliumError) Error() string + type Owner struct + Email string + FirstName *string + ID uuid.UUID + IsPrincipal bool + LastName *string + Username *string + func (o Owner) RedactedEmail() string + type Permission int + const PermissionRead + const PermissionWrite + func PermissionFromInt(v int) (Permission, error) + func PermissionFromString(s string) (Permission, error) + func (p *Permission) UnmarshalJSON(data []byte) error + func (p Permission) MarshalJSON() ([]byte, error) + func (p Permission) String() string + func (p Permission) ToInt() int + type Profile struct + AccID uuid.UUID + AccountIsActive bool + AccountWasApproved bool + AccountWasArchived bool + AccountWasDeleted bool + FilteringState []string + IsManager bool + IsStaff bool + IsSubscription bool + LicensedResources *LicensedResources + Meta map[string]string + OwnerIsActive bool + Owners []Owner + TenantsOwnership *TenantsOwnership + VerboseStatus *VerboseStatus + func DecodeAndDecompressProfileFromBase64(input string, opts ...DecodeOption) (*Profile, error) + func (p Profile) GetIdsOrError() ([]uuid.UUID, error) + func (p Profile) GetOwnersIds() []uuid.UUID + func (p Profile) GetRelatedAccountOrError() (RelatedAccounts, error) + func (p Profile) GetRelatedAccountsOrTenantWidePermissionOrError(tenantID uuid.UUID, permission Permission) (RelatedAccounts, error) + func (p Profile) GetTenantWidePermissionOrError(tenantID uuid.UUID, permission Permission) (RelatedAccounts, error) + func (p Profile) HasAdminPrivileges() bool + func (p Profile) HasAdminPrivilegesOrError() error + func (p Profile) HasNotDenyFlags(flags []string) Profile + func (p Profile) HasPermitFlags(flags []string) Profile + func (p Profile) OnAccount(accountID uuid.UUID) Profile + func (p Profile) OnTenant(tenantID uuid.UUID) Profile + func (p Profile) OnTenantAsManager(tenantID uuid.UUID, permission Permission) Profile + func (p Profile) ProfileRedacted() string + func (p Profile) ProfileString() string + func (p Profile) WithReadAccess() Profile + func (p Profile) WithRoles(roles []string) Profile + func (p Profile) WithSystemAccountsAccess() Profile + func (p Profile) WithTenantOwnershipOrError(tenantID uuid.UUID) (Profile, error) + func (p Profile) WithWriteAccess() Profile + type ProfileDecodingError struct + func NewProfileDecodingError(message string) *ProfileDecodingError + func (e *ProfileDecodingError) Unwrap() error + type RelatedAccounts struct + Accounts []uuid.UUID + Kind RelatedAccountsKind + TenantID *uuid.UUID + func NewAllowedAccounts(accounts []uuid.UUID) RelatedAccounts + func NewHasManagerPrivileges() RelatedAccounts + func NewHasStaffPrivileges() RelatedAccounts + func NewHasTenantWidePrivileges(tenantID uuid.UUID) RelatedAccounts + func (ra *RelatedAccounts) UnmarshalJSON(data []byte) error + func (ra RelatedAccounts) MarshalJSON() ([]byte, error) + type RelatedAccountsKind string + const RelatedAccountsAllowedAccounts + const RelatedAccountsHasManagerPrivileges + const RelatedAccountsHasStaffPrivileges + const RelatedAccountsHasTenantWidePrivileges + type TenantOwnership struct + ID uuid.UUID + Name string + Since time.Time + func TenantOwnershipFromString(value string) (TenantOwnership, error) + func (t TenantOwnership) String() string + type TenantsOwnership struct + Records []TenantOwnership + Urls []string + func (to *TenantsOwnership) UnmarshalJSON(data []byte) error + func (to TenantsOwnership) MarshalJSON() ([]byte, error) + func (to TenantsOwnership) ToOwnershipVector() []TenantOwnership + type VerboseStatus string + const VerboseStatusArchived + const VerboseStatusDeleted + const VerboseStatusInactive + const VerboseStatusUnknown + const VerboseStatusUnverified + const VerboseStatusVerified + func ParseVerboseStatus(s string) VerboseStatus + func (v VerboseStatus) IsValid() bool