Documentation
¶
Index ¶
- Constants
- Variables
- type Address
- type Affiliation
- type AffiliationManager
- type AffiliationType
- type Client
- func (m *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) NewRequest(ctx context.Context, method, uri string, payload any, options ...RequestOption) (*http.Request, error)
- func (m *Client) Request(ctx context.Context, method, uri string, payload any, result any, ...) error
- func (c *Client) URL(parts ...string) string
- type ClientCredentialsEnv
- type ClientOption
- func WithClient(client *http.Client) ClientOption
- func WithClientCredentials(ctx context.Context, credEnv ClientCredentialsEnv, ...) ClientOption
- func WithEmulator(ctx context.Context, credEnv ClientCredentialsEnv, scopes ...string) ClientOption
- func WithStaticToken(token string) ClientOption
- func WithTokenSource(tokenSource oauth2.TokenSource) ClientOption
- type Consent
- type ConsentManager
- type ConsentPurpose
- type Country
- type CountryManager
- type Error
- type ErrorCode
- type ErrorResponse
- type Gender
- type Grant
- type Group
- type GroupManager
- func (m *GroupManager) Find(ctx context.Context, opts ...RequestOption) (ResponseWithMeta[[]Group], error)
- func (m *GroupManager) FindMembers(ctx context.Context, groupUid uuid.UUID, opts ...RequestOption) (ResponseWithMeta[[]GroupMember], error)
- func (m *GroupManager) Get(ctx context.Context, uid uuid.UUID, opts ...RequestOption) (Response[Group], error)
- func (m *GroupManager) GetMember(ctx context.Context, groupUid uuid.UUID, memberUid uuid.UUID, ...) (Response[GroupMember], error)
- type GroupMember
- type GroupType
- type MaritalStatus
- type Meta
- type NationalId
- type Org
- type OrgActiveStatus
- type OrgManager
- type OrgType
- type Person
- type PersonManager
- type PersonRelation
- type PersonRelationType
- type Preferences
- type QueryOpts
- type Relation
- type RelationManager
- type RelationType
- type RequestOption
- func Fields(fields ...string) RequestOption
- func Filter(filter string) RequestOption
- func Limit(n int) RequestOption
- func Page(n int) RequestOption
- func QueryOptions(q QueryOpts) RequestOption
- func Search(s string) RequestOption
- func Skip(n int) RequestOption
- func Sort(sortFields ...string) RequestOption
- type Response
- type ResponseWithMeta
- type Role
- type RoleAssignment
- type RoleAssignmentManager
- type RoleManager
- type RoleScope
- type SearchVisibility
- type VisibilityPreferences
Constants ¶
const ( PersonsRead = "persons#read" PersonsNameRead = "persons.name#read" PersonsBirthDateRead = "persons.birth_date#read" PersonsDeceasedDateRead = "persons.deceased_date#read" PersonsNationalIdsRead = "persons.national_ids#read" PersonsGenderRead = "persons.gender#read" PersonsEmailRead = "persons.email#read" PersonsPhoneRead = "persons.phone#read" PersonsPreferencesRead = "persons.preferences#read" PersonsAddressRead = "persons.address#read" PersonsProfilePictureRead = "persons.profile_picture#read" PersonAffiliationsRead = "persons.affiliations#read" PersonRelationsRead = "persons.relations#read" PersonConsentsRead = "persons.consents#read" PersonRoleAssignmentsRead = "persons.role_assignments#read" PersonPersonIdRead = "persons.person_id#read" OrgsRead = "orgs#read" CountriesRead = "countries#read" RolesRead = "roles#read" GroupsRead = "groups#read" )
const UrlDev = "https://dev-api.bcc.no"
const UrlProd = "https://api.bcc.no"
const UrlSandbox = "https://sandbox-api.bcc.no"
Variables ¶
var AffiliationPath = "/affiliations"
var ConsentPath = "/consents"
var CountryPath = "/countries"
var CredEnvDev = ClientCredentialsEnv{
TokenUrl: "https://bcc-sso-dev.eu.auth0.com/oauth/token",
Audience: "dev-api.bcc.no",
}
var CredEnvProd = ClientCredentialsEnv{
TokenUrl: "https://bcc-sso.eu.auth0.com/oauth/token",
Audience: "api.bcc.no",
}
var CredEnvSandbox = ClientCredentialsEnv{
TokenUrl: "https://bcc-sso-sandbox.eu.auth0.com/oauth/token",
Audience: "sandbox-api.bcc.no",
}
var DefaultAgent = fmt.Sprintf("Go-Coreapi/%s", Version)
var ErrInvalidAffiliationType = errors.New("not a valid AffiliationType")
var ErrInvalidConsentPurpose = errors.New("not a valid ConsentPurpose")
var ErrInvalidErrorCode = errors.New("not a valid ErrorCode")
var ErrInvalidGender = errors.New("not a valid Gender")
var ErrInvalidGrant = errors.New("not a valid Grant")
var ErrInvalidGroupType = errors.New("not a valid GroupType")
var ErrInvalidMaritalStatus = errors.New("not a valid MaritalStatus")
var ErrInvalidOrgActiveStatus = errors.New("not a valid OrgActiveStatus")
var ErrInvalidOrgType = errors.New("not a valid OrgType")
var ErrInvalidPersonRelationType = errors.New("not a valid PersonRelationType")
var ErrInvalidRelationType = errors.New("not a valid RelationType")
var ErrInvalidRoleScope = errors.New("not a valid RoleScope")
var ErrInvalidSearchVisibility = errors.New("not a valid SearchVisibility")
var GroupPath = "/groups"
var MemberPath = "/members"
var OrgPath = "/v2/orgs"
var PersonPath = "/v2/persons"
var RelationPath = "/relations"
var RoleAssignmentPath = "/roleAssignments"
var RolePath = "/roles"
var Version = "0.0.0-alpha.5"
Functions ¶
This section is empty.
Types ¶
type Affiliation ¶
type Affiliation struct {
Uid uuid.UUID `json:"uid"`
LastChangedDate time.Time `json:"lastChangedDate"`
Org *Org `json:"org"`
Person *Person `json:"person"`
PersonUid uuid.UUID `json:"personUid"`
OrgUid uuid.UUID `json:"orgUid"`
Type AffiliationType `json:"type"`
ValidFrom time.Time `json:"validFrom"`
ValidTo *time.Time `json:"validTo"`
}
type AffiliationManager ¶
type AffiliationManager managerBase
func (*AffiliationManager) Find ¶
func (m *AffiliationManager) Find(ctx context.Context, opts ...RequestOption) (ResponseWithMeta[[]Affiliation], error)
func (*AffiliationManager) Get ¶
func (m *AffiliationManager) Get(ctx context.Context, uid uuid.UUID, opts ...RequestOption) (Response[Affiliation], error)
type AffiliationType ¶
type AffiliationType string
ENUM(Member, Affiliate, Participant)
const ( // AffiliationTypeMember is a AffiliationType of type Member. AffiliationTypeMember AffiliationType = "Member" // AffiliationTypeAffiliate is a AffiliationType of type Affiliate. AffiliationTypeAffiliate AffiliationType = "Affiliate" // AffiliationTypeParticipant is a AffiliationType of type Participant. AffiliationTypeParticipant AffiliationType = "Participant" )
func ParseAffiliationType ¶
func ParseAffiliationType(name string) (AffiliationType, error)
ParseAffiliationType attempts to convert a string to a AffiliationType.
func (AffiliationType) IsValid ¶
func (x AffiliationType) IsValid() bool
String implements the Stringer interface.
func (AffiliationType) MarshalText ¶
func (x AffiliationType) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (AffiliationType) String ¶
func (x AffiliationType) String() string
String implements the Stringer interface.
func (*AffiliationType) UnmarshalText ¶
func (x *AffiliationType) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type Client ¶
type Client struct {
Affiliation *AffiliationManager
Consent *ConsentManager
Country *CountryManager
Group *GroupManager
Org *OrgManager
Person *PersonManager
Relation *RelationManager
RoleAssignment *RoleAssignmentManager
Role *RoleManager
// contains filtered or unexported fields
}
func New ¶
func New(url string, options ...ClientOption) *Client
func (*Client) Do ¶
Do triggers an HTTP request and returns an HTTP response, handling any context cancellations or timeouts.
func (*Client) NewRequest ¶
type ClientCredentialsEnv ¶
type ClientOption ¶
type ClientOption func(*Client)
func WithClient ¶
func WithClient(client *http.Client) ClientOption
WithClient configures the SDK to use the provided client.
func WithClientCredentials ¶
func WithClientCredentials(ctx context.Context, credEnv ClientCredentialsEnv, clientID, clientSecret string, scopes ...string) ClientOption
WithClientCredentials configures the SDK to authenticate using the client credentials authentication flow.
func WithEmulator ¶
func WithEmulator(ctx context.Context, credEnv ClientCredentialsEnv, scopes ...string) ClientOption
WithClientCredentials configures the SDK to authenticate using the client credentials authentication flow against the emulator.
func WithStaticToken ¶
func WithStaticToken(token string) ClientOption
WithClientCredentials configures the SDK to authenticate using the provided token
func WithTokenSource ¶
func WithTokenSource(tokenSource oauth2.TokenSource) ClientOption
WithClientCredentials configures the SDK to authenticate using the provided token source
type Consent ¶
type Consent struct {
Uid uuid.UUID `json:"uid"`
LastChangedDate time.Time `json:"lastChangedDate"`
Person *Person `json:"person"`
Org *Org `json:"org"`
PersonUid uuid.UUID `json:"personUid"`
OrgUid uuid.UUID `json:"orgUid"`
Purpose ConsentPurpose `json:"purpose"`
ValidFrom time.Time `json:"validFrom"`
ValidTo *time.Time `json:"validTo"`
}
type ConsentManager ¶
type ConsentManager managerBase
func (*ConsentManager) Find ¶
func (m *ConsentManager) Find(ctx context.Context, opts ...RequestOption) (ResponseWithMeta[[]Consent], error)
type ConsentPurpose ¶
type ConsentPurpose string
ENUM(DataSharing, Tracking)
const ( // ConsentPurposeDataSharing is a ConsentPurpose of type DataSharing. ConsentPurposeDataSharing ConsentPurpose = "DataSharing" // ConsentPurposeTracking is a ConsentPurpose of type Tracking. ConsentPurposeTracking ConsentPurpose = "Tracking" )
func ParseConsentPurpose ¶
func ParseConsentPurpose(name string) (ConsentPurpose, error)
ParseConsentPurpose attempts to convert a string to a ConsentPurpose.
func (ConsentPurpose) IsValid ¶
func (x ConsentPurpose) IsValid() bool
String implements the Stringer interface.
func (ConsentPurpose) MarshalText ¶
func (x ConsentPurpose) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (ConsentPurpose) String ¶
func (x ConsentPurpose) String() string
String implements the Stringer interface.
func (*ConsentPurpose) UnmarshalText ¶
func (x *ConsentPurpose) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type CountryManager ¶
type CountryManager managerBase
func (*CountryManager) Find ¶
func (m *CountryManager) Find(ctx context.Context, opts ...RequestOption) (ResponseWithMeta[[]Country], error)
type ErrorCode ¶
type ErrorCode string //@name ErrorCode
ENUM(
not-found invalid-query, invalid-body, invalid-key-reference, duplicate-unique-key, cannot-parse-token, invalid-token, missing-scopes, internal-error, unauthorized, invalid-app-uid, unknown-error-response,
)
const ( // ErrorCodeNotFound is a ErrorCode of type not-found. ErrorCodeNotFound ErrorCode = "not-found" // ErrorCodeInvalidQuery is a ErrorCode of type invalid-query. ErrorCodeInvalidQuery ErrorCode = "invalid-query" // ErrorCodeInvalidBody is a ErrorCode of type invalid-body. ErrorCodeInvalidBody ErrorCode = "invalid-body" // ErrorCodeInvalidKeyReference is a ErrorCode of type invalid-key-reference. ErrorCodeInvalidKeyReference ErrorCode = "invalid-key-reference" // ErrorCodeDuplicateUniqueKey is a ErrorCode of type duplicate-unique-key. ErrorCodeDuplicateUniqueKey ErrorCode = "duplicate-unique-key" // ErrorCodeCannotParseToken is a ErrorCode of type cannot-parse-token. ErrorCodeCannotParseToken ErrorCode = "cannot-parse-token" // ErrorCodeInvalidToken is a ErrorCode of type invalid-token. ErrorCodeInvalidToken ErrorCode = "invalid-token" // ErrorCodeMissingScopes is a ErrorCode of type missing-scopes. ErrorCodeMissingScopes ErrorCode = "missing-scopes" // ErrorCodeInternalError is a ErrorCode of type internal-error. ErrorCodeInternalError ErrorCode = "internal-error" ErrorCodeUnauthorized ErrorCode = "unauthorized" // ErrorCodeInvalidAppUid is a ErrorCode of type invalid-app-uid. ErrorCodeInvalidAppUid ErrorCode = "invalid-app-uid" // ErrorCodeUnknownErrorResponse is a ErrorCode of type unknown-error-response. ErrorCodeUnknownErrorResponse ErrorCode = "unknown-error-response" )
func ParseErrorCode ¶
ParseErrorCode attempts to convert a string to a ErrorCode.
func (ErrorCode) MarshalText ¶
MarshalText implements the text marshaller method.
func (*ErrorCode) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type ErrorResponse ¶
type ErrorResponse struct {
Error Error `json:"error"`
}
type Gender ¶
type Gender string
ENUM(Male, Female, Unknown)
func ParseGender ¶
ParseGender attempts to convert a string to a Gender.
func (Gender) MarshalText ¶
MarshalText implements the text marshaller method.
func (*Gender) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type Grant ¶
type Grant string //@name GrantType
ENUM(Default, View, Administrate, Represent, None)
const ( // GrantDefault is a Grant of type Default. GrantDefault Grant = "Default" // GrantView is a Grant of type View. GrantView Grant = "View" // GrantAdministrate is a Grant of type Administrate. GrantAdministrate Grant = "Administrate" // GrantRepresent is a Grant of type Represent. GrantRepresent Grant = "Represent" // GrantNone is a Grant of type None. GrantNone Grant = "None" )
func ParseGrant ¶
ParseGrant attempts to convert a string to a Grant.
func (Grant) MarshalText ¶
MarshalText implements the text marshaller method.
func (*Grant) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type GroupManager ¶
type GroupManager managerBase
func (*GroupManager) Find ¶
func (m *GroupManager) Find(ctx context.Context, opts ...RequestOption) (ResponseWithMeta[[]Group], error)
func (*GroupManager) FindMembers ¶
func (m *GroupManager) FindMembers(ctx context.Context, groupUid uuid.UUID, opts ...RequestOption) (ResponseWithMeta[[]GroupMember], error)
func (*GroupManager) Get ¶
func (m *GroupManager) Get(ctx context.Context, uid uuid.UUID, opts ...RequestOption) (Response[Group], error)
func (*GroupManager) GetMember ¶
func (m *GroupManager) GetMember(ctx context.Context, groupUid uuid.UUID, memberUid uuid.UUID, opts ...RequestOption) (Response[GroupMember], error)
type GroupMember ¶
type GroupType ¶
type GroupType string // @name GroupType
ENUM( Static, Dynamic )
func ParseGroupType ¶
ParseGroupType attempts to convert a string to a GroupType.
func (GroupType) MarshalText ¶
MarshalText implements the text marshaller method.
func (*GroupType) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type MaritalStatus ¶
type MaritalStatus string
ENUM(Single, Married, Widowed, Separated, SingleParent, Unknown)
const ( // MaritalStatusSingle is a MaritalStatus of type Single. MaritalStatusSingle MaritalStatus = "Single" // MaritalStatusMarried is a MaritalStatus of type Married. MaritalStatusMarried MaritalStatus = "Married" // MaritalStatusWidowed is a MaritalStatus of type Widowed. MaritalStatusWidowed MaritalStatus = "Widowed" // MaritalStatusSeparated is a MaritalStatus of type Separated. MaritalStatusSeparated MaritalStatus = "Separated" // MaritalStatusSingleParent is a MaritalStatus of type SingleParent. MaritalStatusSingleParent MaritalStatus = "SingleParent" // MaritalStatusUnknown is a MaritalStatus of type Unknown. MaritalStatusUnknown MaritalStatus = "Unknown" )
func ParseMaritalStatus ¶
func ParseMaritalStatus(name string) (MaritalStatus, error)
ParseMaritalStatus attempts to convert a string to a MaritalStatus.
func (MaritalStatus) IsValid ¶
func (x MaritalStatus) IsValid() bool
String implements the Stringer interface.
func (MaritalStatus) MarshalText ¶
func (x MaritalStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (MaritalStatus) String ¶
func (x MaritalStatus) String() string
String implements the Stringer interface.
func (*MaritalStatus) UnmarshalText ¶
func (x *MaritalStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type NationalId ¶
type Org ¶
type Org struct {
Uid uuid.UUID `json:"uid"`
OrgID int `json:"orgID"`
LastChangedDate time.Time `json:"lastChangedDate"`
Name string `json:"name"`
DistrictName string `json:"districtName"`
Type OrgType `json:"type"`
ActiveStatus OrgActiveStatus `json:"activeStatus"`
PostalAddress Address `json:"postalAddress"`
BillingAddress Address `json:"billingAddress"`
VisitingAddress Address `json:"visitingAddress"`
}
type OrgActiveStatus ¶
type OrgActiveStatus string
ENUM(Active, Inactive)
const ( // OrgActiveStatusActive is a OrgActiveStatus of type Active. OrgActiveStatusActive OrgActiveStatus = "Active" // OrgActiveStatusInactive is a OrgActiveStatus of type Inactive. OrgActiveStatusInactive OrgActiveStatus = "Inactive" )
func ParseOrgActiveStatus ¶
func ParseOrgActiveStatus(name string) (OrgActiveStatus, error)
ParseOrgActiveStatus attempts to convert a string to a OrgActiveStatus.
func (OrgActiveStatus) IsValid ¶
func (x OrgActiveStatus) IsValid() bool
String implements the Stringer interface.
func (OrgActiveStatus) MarshalText ¶
func (x OrgActiveStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (OrgActiveStatus) String ¶
func (x OrgActiveStatus) String() string
String implements the Stringer interface.
func (*OrgActiveStatus) UnmarshalText ¶
func (x *OrgActiveStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type OrgManager ¶
type OrgManager managerBase
func (*OrgManager) Find ¶
func (m *OrgManager) Find(ctx context.Context, opts ...RequestOption) (ResponseWithMeta[[]Org], error)
type OrgType ¶
type OrgType string
ENUM(Church, Club, Org)
func ParseOrgType ¶
ParseOrgType attempts to convert a string to a OrgType.
func (OrgType) MarshalText ¶
MarshalText implements the text marshaller method.
func (*OrgType) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type Person ¶
type Person struct {
Uid uuid.UUID `json:"uid"`
PersonID int `json:"personID"`
Affiliations []Affiliation `json:"affiliations"`
Relations []PersonRelation `json:"relations"`
Consents []Consent `json:"consents"`
RoleAssignments []RoleAssignment `json:"roleAssignments"`
LastChangedDate time.Time `json:"lastChangedDate"`
FirstName string `json:"firstName"`
MiddleName string `json:"middleName"`
LastName string `json:"lastName"`
DisplayName string `json:"displayName"`
BirthDate civil.Date `json:"birthDate"`
DeceasedDate civil.Date `json:"deceasedDate"`
Gender Gender `json:"gender"`
MaritalStatus MaritalStatus `json:"maritalStatus"`
Email string `json:"email"`
EmailVerified bool `json:"emailVerified"`
CellPhone string `json:"cellPhone"`
CellPhoneVerified bool `json:"cellPhoneVerified"`
HomePhone string `json:"homePhone"`
Preferences Preferences `json:"preferences"`
Address Address `json:"address"`
NationalIds []NationalId `json:"nationalIds"`
// URL of person's profile picture
ProfilePicture string `json:"profilePicture"`
}
type PersonManager ¶
type PersonManager managerBase
func (*PersonManager) Find ¶
func (m *PersonManager) Find(ctx context.Context, opts ...RequestOption) (ResponseWithMeta[[]Person], error)
type PersonRelation ¶
type PersonRelation struct {
TargetUid uuid.UUID `json:"targetUid"`
Target *Person `json:"target"`
// Permission of origin on target
GrantToTarget Grant `json:"grantToTarget"`
// Permission of target on origin
GrantToOrigin Grant `json:"grantToOrigin"`
// Type of relation, defined as {target} is {type} of {origin}
Type PersonRelationType `json:"type"`
ValidFrom time.Time `json:"validFrom"`
ValidTo *time.Time `json:"validTo"`
} //@name PersonRelation
type PersonRelationType ¶
type PersonRelationType string //@name PersonRelationType
ENUM(Child, Parent, Spouse, LegalDependent, LegalGuardian, FosterChild, FosterParent, ContactDependent, ContactPerson)
const ( // PersonRelationTypeChild is a PersonRelationType of type Child. PersonRelationTypeChild PersonRelationType = "Child" // PersonRelationTypeParent is a PersonRelationType of type Parent. PersonRelationTypeParent PersonRelationType = "Parent" // PersonRelationTypeSpouse is a PersonRelationType of type Spouse. PersonRelationTypeSpouse PersonRelationType = "Spouse" // PersonRelationTypeLegalDependent is a PersonRelationType of type LegalDependent. PersonRelationTypeLegalDependent PersonRelationType = "LegalDependent" // PersonRelationTypeLegalGuardian is a PersonRelationType of type LegalGuardian. PersonRelationTypeLegalGuardian PersonRelationType = "LegalGuardian" // PersonRelationTypeFosterChild is a PersonRelationType of type FosterChild. PersonRelationTypeFosterChild PersonRelationType = "FosterChild" // PersonRelationTypeFosterParent is a PersonRelationType of type FosterParent. PersonRelationTypeFosterParent PersonRelationType = "FosterParent" // PersonRelationTypeContactDependent is a PersonRelationType of type ContactDependent. PersonRelationTypeContactDependent PersonRelationType = "ContactDependent" // PersonRelationTypeContactPerson is a PersonRelationType of type ContactPerson. PersonRelationTypeContactPerson PersonRelationType = "ContactPerson" )
func ParsePersonRelationType ¶
func ParsePersonRelationType(name string) (PersonRelationType, error)
ParsePersonRelationType attempts to convert a string to a PersonRelationType.
func (PersonRelationType) IsValid ¶
func (x PersonRelationType) IsValid() bool
String implements the Stringer interface.
func (PersonRelationType) MarshalText ¶
func (x PersonRelationType) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (PersonRelationType) String ¶
func (x PersonRelationType) String() string
String implements the Stringer interface.
func (*PersonRelationType) UnmarshalText ¶
func (x *PersonRelationType) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type Preferences ¶
type Preferences struct {
ContentLanguages []string `json:"contentLanguages"`
UiLanguages []string `json:"uiLanguages"`
Visibility VisibilityPreferences `json:"visibility"`
}
type Relation ¶
type Relation struct {
Uid uuid.UUID `json:"uid"`
LastChangedDate time.Time `json:"lastChangedDate"`
Origin *Person `json:"origin"`
Target *Person `json:"target"`
OriginUid uuid.UUID `json:"originUid"`
TargetUid uuid.UUID `json:"targetUid"`
// Type of the relation, defined as {origin} is {type} (of) {target}
Type RelationType `json:"type"`
// Permission of origin on target
GrantToTarget Grant `json:"grantToTarget"`
// Permission of target on origin
GrantToOrigin Grant `json:"grantToOrigin"`
ValidFrom time.Time `json:"validFrom"`
ValidTo *time.Time `json:"validTo"`
}
type RelationManager ¶
type RelationManager managerBase
func (*RelationManager) Find ¶
func (m *RelationManager) Find(ctx context.Context, opts ...RequestOption) (ResponseWithMeta[[]Relation], error)
type RelationType ¶
type RelationType string
ENUM(ChildOf, SpouseOf, LegalDependentOf, FosterChildOf, ContactDependentOf)
const ( // RelationTypeChildOf is a RelationType of type ChildOf. RelationTypeChildOf RelationType = "ChildOf" // RelationTypeSpouseOf is a RelationType of type SpouseOf. RelationTypeSpouseOf RelationType = "SpouseOf" // RelationTypeLegalDependentOf is a RelationType of type LegalDependentOf. RelationTypeLegalDependentOf RelationType = "LegalDependentOf" // RelationTypeFosterChildOf is a RelationType of type FosterChildOf. RelationTypeFosterChildOf RelationType = "FosterChildOf" // RelationTypeContactDependentOf is a RelationType of type ContactDependentOf. RelationTypeContactDependentOf RelationType = "ContactDependentOf" )
func ParseRelationType ¶
func ParseRelationType(name string) (RelationType, error)
ParseRelationType attempts to convert a string to a RelationType.
func (RelationType) IsValid ¶
func (x RelationType) IsValid() bool
String implements the Stringer interface.
func (RelationType) MarshalText ¶
func (x RelationType) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (RelationType) String ¶
func (x RelationType) String() string
String implements the Stringer interface.
func (*RelationType) UnmarshalText ¶
func (x *RelationType) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type RequestOption ¶
func Fields ¶
func Fields(fields ...string) RequestOption
func Filter ¶
func Filter(filter string) RequestOption
func Limit ¶
func Limit(n int) RequestOption
func Page ¶
func Page(n int) RequestOption
func QueryOptions ¶
func QueryOptions(q QueryOpts) RequestOption
func Search ¶
func Search(s string) RequestOption
func Skip ¶
func Skip(n int) RequestOption
func Sort ¶
func Sort(sortFields ...string) RequestOption
type ResponseWithMeta ¶
type RoleAssignment ¶
type RoleAssignment struct {
Uid uuid.UUID `json:"uid"`
LastChangedDate time.Time `json:"lastChangedDate"`
Person *Person `json:"person"`
Role *Role `json:"role"`
Org *Org `json:"org"`
PersonUid uuid.UUID `json:"personUid"`
RoleUid uuid.UUID `json:"roleUid"`
OrgUid *uuid.UUID `json:"orgUid"`
ValidFrom time.Time `json:"validFrom"`
ValidTo *time.Time `json:"validTo"`
}
type RoleAssignmentManager ¶
type RoleAssignmentManager managerBase
func (*RoleAssignmentManager) Find ¶
func (m *RoleAssignmentManager) Find(ctx context.Context, opts ...RequestOption) (ResponseWithMeta[[]RoleAssignment], error)
func (*RoleAssignmentManager) Get ¶
func (m *RoleAssignmentManager) Get(ctx context.Context, uid uuid.UUID, opts ...RequestOption) (Response[RoleAssignment], error)
type RoleManager ¶
type RoleManager managerBase
func (*RoleManager) Find ¶
func (m *RoleManager) Find(ctx context.Context, opts ...RequestOption) (ResponseWithMeta[[]Role], error)
type RoleScope ¶
type RoleScope string //@name RoleScope
ENUM(Global, Org)
func ParseRoleScope ¶
ParseRoleScope attempts to convert a string to a RoleScope.
func (RoleScope) MarshalText ¶
MarshalText implements the text marshaller method.
func (*RoleScope) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type SearchVisibility ¶
type SearchVisibility string
ENUM(Global, District, Hidden)
const ( // SearchVisibilityGlobal is a SearchVisibility of type Global. SearchVisibilityGlobal SearchVisibility = "Global" // SearchVisibilityDistrict is a SearchVisibility of type District. SearchVisibilityDistrict SearchVisibility = "District" // SearchVisibilityHidden is a SearchVisibility of type Hidden. SearchVisibilityHidden SearchVisibility = "Hidden" )
func ParseSearchVisibility ¶
func ParseSearchVisibility(name string) (SearchVisibility, error)
ParseSearchVisibility attempts to convert a string to a SearchVisibility.
func (SearchVisibility) IsValid ¶
func (x SearchVisibility) IsValid() bool
String implements the Stringer interface.
func (SearchVisibility) MarshalText ¶
func (x SearchVisibility) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (SearchVisibility) String ¶
func (x SearchVisibility) String() string
String implements the Stringer interface.
func (*SearchVisibility) UnmarshalText ¶
func (x *SearchVisibility) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type VisibilityPreferences ¶
type VisibilityPreferences struct {
BirthdayList bool `json:"birthdayList"`
Search SearchVisibility `json:"search"`
}
Source Files
¶
- affiliation.go
- affiliation_enum.go
- client.go
- client_environment.go
- client_option.go
- client_request.go
- client_request_option.go
- client_scope.go
- consent.go
- consent_enum.go
- country.go
- error.go
- error_enum.go
- group.go
- group_enum.go
- meta.go
- org.go
- org_enum.go
- person.go
- person_enum.go
- relation.go
- relation_enum.go
- response.go
- role.go
- role_assignment.go
- role_enum.go