Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyChanges(object any, changes []Change) error
- func ApplyChangesWithObject(object any, changes []Change) (any, error)
- func FormatError(err error) interface{}
- func HandleError(c *gin.Context, code int, err error)
- func InitRoles(controller Controller, roles []*ObjectRoleSpec) error
- func InitUsers(controller Controller, users []*ExternalUser) error
- func OpName(op Op) string
- type APIControllerDefinitions
- type APIControllerMaker
- type APIPlugin
- type AccessToken
- type AssociateAdaptor
- type BaseChangeRequest
- type BaseChangeRequestReview
- func (b *BaseChangeRequestReview) Create(values map[string]interface{}) error
- func (b *BaseChangeRequestReview) Creator() User
- func (b *BaseChangeRequestReview) MarshalJSON() ([]byte, error)
- func (b *BaseChangeRequestReview) Project() kodex.Project
- func (b *BaseChangeRequestReview) Type() string
- func (b *BaseChangeRequestReview) Update(values map[string]interface{}) error
- type BaseComment
- type BaseController
- func (b *BaseController) APIDefinitions() *Definitions
- func (b *BaseController) CanAccess(user *ExternalUser, object kodex.Model, objectRoles []string) (bool, error)
- func (b *BaseController) ObjectRolesForUser(objectType string, user *ExternalUser) ([]ObjectRole, error)
- func (b *BaseController) RegisterAPIPlugin(plugin APIPlugin) error
- func (b *BaseController) UserProvider() (UserProvider, error)
- type BaseDefaultObjectRole
- type BaseObjectRole
- type BaseOrganization
- type BaseUser
- type Blueprint
- type Change
- type ChangeRequest
- type ChangeRequestReview
- type ChangeRequestReviewStatus
- type ChangeRequestStatus
- type ChangeSet
- type Comment
- type CommentStatus
- type Controller
- type Copyable
- type CreateObjectAdaptor
- type CreateUserProvider
- type DefaultObjectRole
- type Definitions
- type DiffOptions
- type ExternalUser
- type IsChangeRequestReviewStatus
- type IsChangeRequestStatus
- type IsCommentStatus
- type ListAllObjectAdaptor
- type ObjectAdaptor
- type ObjectRole
- type ObjectRoleSpec
- type Op
- type Organization
- type OrganizationRoles
- type PathElement
- type PathType
- type Routes
- type Settings
- type SettingsValidator
- type UpdateObjectAdaptor
- type User
- type UserOrganization
- type UserProvider
- type UserProviderDefinition
- type UserProviderDefinitions
- type UserProviderMaker
- type UserProviderPlugin
- type UserProviderSettings
- type UsersAndRoles
Constants ¶
View Source
const ( Insert Op = 0 Remove = 1 Update = 2 Swap = 3 )
Variables ¶
View Source
var AccessTokenForm = forms.Form{ Fields: []forms.Field{ { Name: "token", Validators: []forms.Validator{ forms.IsBytes{Encoding: "hex"}, }, }, { Name: "scopes", Validators: []forms.Validator{ forms.IsList{ Validators: []forms.Validator{ forms.IsString{}, }, }, }, }, }, }
View Source
var BPObjectRoleForm = forms.Form{ Fields: []forms.Field{ { Name: "objectType", Validators: []forms.Validator{ forms.IsString{}, }, }, { Name: "organizationID", Validators: []forms.Validator{ forms.IsBytes{Encoding: "hex"}, }, }, { Name: "objectID", Validators: []forms.Validator{ forms.IsBytes{Encoding: "hex"}, }, }, { Name: "organizationRole", Validators: []forms.Validator{ forms.IsString{}, }, }, { Name: "objectRole", Validators: []forms.Validator{ forms.IsString{}, }, }, }, }
View Source
var BPOrganizationForm = forms.Form{ Fields: []forms.Field{ { Name: "source", Validators: []forms.Validator{ forms.IsOptional{Default: "inMemory"}, forms.IsIn{Choices: []interface{}{"inMemory"}}, }, }, { Name: "name", Validators: []forms.Validator{ forms.IsString{}, }, }, { Name: "default", Validators: []forms.Validator{ forms.IsOptional{Default: false}, forms.IsBoolean{}, }, }, { Name: "id", Validators: []forms.Validator{ forms.IsBytes{Encoding: "hex"}, }, }, }, }
View Source
var BlueprintConfigForm = forms.Form{ Fields: []forms.Field{ { Name: "users", Validators: []forms.Validator{ forms.IsOptional{}, forms.IsList{ Validators: []forms.Validator{ forms.IsStringMap{ Form: &BlueprintUserForm, }, }, }, }, }, { Name: "roles", Validators: []forms.Validator{ forms.IsList{ Validators: []forms.Validator{ forms.IsStringMap{ Form: &BPObjectRoleForm, }, }, }, }, }, }, }
View Source
var BlueprintUserForm = forms.Form{ Fields: []forms.Field{ { Name: "source", Validators: []forms.Validator{ forms.IsOptional{Default: "inMemory"}, forms.IsIn{Choices: []interface{}{"inMemory"}}, }, }, { Name: "email", Validators: []forms.Validator{ forms.IsOptional{}, forms.IsString{}, }, }, { Name: "displayName", Validators: []forms.Validator{ forms.IsOptional{}, forms.IsString{}, }, }, { Name: "superuser", Validators: []forms.Validator{ forms.IsOptional{Default: false}, forms.IsBoolean{}, }, }, { Name: "accessToken", Validators: []forms.Validator{ forms.IsStringMap{ Form: &AccessTokenForm, }, }, }, { Name: "roles", Validators: []forms.Validator{ forms.IsList{ Validators: []forms.Validator{ forms.IsStringMap{ Form: &RolesForm, }, }, }, }, }, }, }
View Source
var ChangeRequestForm = forms.Form{ ErrorMsg: "invalid data encountered in the change request config", Fields: []forms.Field{ { Name: "data", Validators: []forms.Validator{ forms.IsOptional{}, forms.IsStringMap{}, }, }, { Name: "description", Validators: []forms.Validator{ forms.IsString{MinLength: 5}, }, }, { Name: "title", Validators: []forms.Validator{ forms.IsString{MinLength: 2}, }, }, { Name: "status", Validators: []forms.Validator{ forms.IsOptional{Default: DraftCR}, IsChangeRequestStatus{}, }, }, }, }
View Source
var ChangeRequestReviewForm = forms.Form{ ErrorMsg: "invalid data encountered in the change request config", Fields: []forms.Field{ { Name: "data", Validators: []forms.Validator{ forms.IsOptional{}, forms.IsStringMap{}, }, }, { Name: "description", Validators: []forms.Validator{ forms.IsString{MinLength: 10}, }, }, { Name: "status", Validators: []forms.Validator{ forms.IsOptional{Default: ReviewRequested}, IsChangeRequestReviewStatus{}, forms.IsIn{Choices: []interface{}{ReviewRequested}}, }, }, }, }
View Source
var CommentForm = forms.Form{ ErrorMsg: "invalid data encountered in the change request config", Fields: []forms.Field{ { Name: "data", Validators: []forms.Validator{ forms.IsOptional{}, forms.IsStringMap{}, }, }, { Name: "text", Validators: []forms.Validator{ forms.IsString{MinLength: 5}, }, }, { Name: "status", Validators: []forms.Validator{ forms.IsOptional{Default: DraftComment}, IsCommentStatus{}, forms.IsIn{Choices: []interface{}{DraftComment, PublishedComment, DeletedComment}}, }, }, }, }
View Source
var DefaultObjectRoleForm = forms.Form{ ErrorMsg: "invalid data encountered in the default object role form", Fields: []forms.Field{ { Name: "organization_role", Validators: []forms.Validator{ forms.IsRequired{}, forms.IsString{MinLength: 2, MaxLength: 100}, forms.MatchesRegex{Regexp: regexp.MustCompile(`^[\w\d\-\:\.]{2,100}$`)}, }, }, { Name: "role", Validators: []forms.Validator{ forms.IsRequired{}, forms.IsString{}, forms.IsIn{Choices: []interface{}{"superuser", "admin", "viewer", "reviewer", "editor", "legal-reviewer", "technical-reviewer"}}, }, }, }, }
View Source
var ObjectRoleForm = forms.Form{ ErrorMsg: "invalid data encountered in the object role form", Fields: []forms.Field{ { Name: "organization_role", Validators: []forms.Validator{ forms.IsRequired{}, forms.IsString{MinLength: 2, MaxLength: 100}, forms.MatchesRegex{Regexp: regexp.MustCompile(`^[\w\d\-\:\.]{2,100}$`)}, }, }, { Name: "role", Validators: []forms.Validator{ forms.IsRequired{}, forms.IsString{}, forms.IsIn{Choices: []interface{}{"superuser", "admin", "viewer", "reviewer", "editor", "legal-reviewer", "technical-reviewer"}}, }, }, }, }
View Source
var OrganizationForm = forms.Form{ ErrorMsg: "invalid data encountered in the organization form", Fields: []forms.Field{ { Name: "name", Validators: append([]forms.Validator{ forms.IsRequired{}}, kodex.NameValidators...), }, { Name: "description", Validators: append([]forms.Validator{ forms.IsOptional{Default: ""}}, kodex.DescriptionValidators...), }, { Name: "data", Validators: []forms.Validator{forms.IsOptional{}, forms.IsStringMap{}}, }, }, }
View Source
var RolesForm = forms.Form{ Fields: []forms.Field{ { Name: "roles", Validators: []forms.Validator{ forms.IsStringList{}, }, }, { Name: "organization", Validators: []forms.Validator{ forms.IsStringMap{ Form: &BPOrganizationForm, }, }, }, }, }
View Source
var UserForm = forms.Form{ ErrorMsg: "invalid data encountered in the user form", Fields: []forms.Field{ { Name: "displayName", Validators: append([]forms.Validator{ forms.IsRequired{}}, kodex.NameValidators...), }, { Name: "email", Validators: append([]forms.Validator{ forms.IsRequired{}}, kodex.NameValidators...), }, { Name: "data", Validators: []forms.Validator{forms.IsOptional{}, forms.IsStringMap{}}, }, }, }
Functions ¶
func ApplyChanges ¶ added in v0.1.0
func ApplyChangesWithObject ¶ added in v0.1.0
Applies a sequence of changes to an object
func FormatError ¶
func FormatError(err error) interface{}
func InitRoles ¶ added in v0.1.0
func InitRoles(controller Controller, roles []*ObjectRoleSpec) error
func InitUsers ¶ added in v0.1.0
func InitUsers(controller Controller, users []*ExternalUser) error
Types ¶
type APIControllerDefinitions ¶
type APIControllerDefinitions map[string]APIControllerMaker
type APIControllerMaker ¶
type APIControllerMaker func( config map[string]interface{}, baseController kodex.Controller, definitions *Definitions) (Controller, error)
type APIPlugin ¶
type APIPlugin interface { InitializeAPI(*gin.RouterGroup, Controller, kodex.Meter) error InitializeAdaptors(map[string]ObjectAdaptor) error }
type AccessToken ¶
type AccessToken struct { Scopes []string `json:"scopes"` Token []byte `json:"-" coerce:"name:token"` }
func MakeAccessToken ¶
func MakeAccessToken(scopes []string) *AccessToken
type AssociateAdaptor ¶
type BaseChangeRequest ¶ added in v0.1.0
type BaseChangeRequest struct { Self ChangeRequest Creator_ User }
func (*BaseChangeRequest) Create ¶ added in v0.1.0
func (b *BaseChangeRequest) Create(values map[string]interface{}) error
func (*BaseChangeRequest) Creator ¶ added in v0.1.0
func (b *BaseChangeRequest) Creator() User
func (*BaseChangeRequest) MarshalJSON ¶ added in v0.1.0
func (b *BaseChangeRequest) MarshalJSON() ([]byte, error)
func (*BaseChangeRequest) Type ¶ added in v0.1.0
func (b *BaseChangeRequest) Type() string
func (*BaseChangeRequest) Update ¶ added in v0.1.0
func (b *BaseChangeRequest) Update(values map[string]interface{}) error
type BaseChangeRequestReview ¶ added in v0.1.0
type BaseChangeRequestReview struct { Self ChangeRequestReview Project_ kodex.Project Creator_ User }
func (*BaseChangeRequestReview) Create ¶ added in v0.1.0
func (b *BaseChangeRequestReview) Create(values map[string]interface{}) error
func (*BaseChangeRequestReview) Creator ¶ added in v0.1.0
func (b *BaseChangeRequestReview) Creator() User
func (*BaseChangeRequestReview) MarshalJSON ¶ added in v0.1.0
func (b *BaseChangeRequestReview) MarshalJSON() ([]byte, error)
func (*BaseChangeRequestReview) Project ¶ added in v0.1.0
func (b *BaseChangeRequestReview) Project() kodex.Project
func (*BaseChangeRequestReview) Type ¶ added in v0.1.0
func (b *BaseChangeRequestReview) Type() string
func (*BaseChangeRequestReview) Update ¶ added in v0.1.0
func (b *BaseChangeRequestReview) Update(values map[string]interface{}) error
type BaseComment ¶ added in v0.1.0
func (*BaseComment) Create ¶ added in v0.1.0
func (b *BaseComment) Create(values map[string]interface{}) error
func (*BaseComment) Creator ¶ added in v0.1.0
func (b *BaseComment) Creator() User
func (*BaseComment) MarshalJSON ¶ added in v0.1.0
func (b *BaseComment) MarshalJSON() ([]byte, error)
func (*BaseComment) Type ¶ added in v0.1.0
func (b *BaseComment) Type() string
func (*BaseComment) Update ¶ added in v0.1.0
func (b *BaseComment) Update(values map[string]interface{}) error
type BaseController ¶
type BaseController struct { Definitions_ *Definitions UserProvider_ UserProvider Self Controller }
func (*BaseController) APIDefinitions ¶
func (b *BaseController) APIDefinitions() *Definitions
func (*BaseController) CanAccess ¶
func (b *BaseController) CanAccess(user *ExternalUser, object kodex.Model, objectRoles []string) (bool, error)
func (*BaseController) ObjectRolesForUser ¶
func (b *BaseController) ObjectRolesForUser(objectType string, user *ExternalUser) ([]ObjectRole, error)
func (*BaseController) RegisterAPIPlugin ¶
func (b *BaseController) RegisterAPIPlugin(plugin APIPlugin) error
func (*BaseController) UserProvider ¶
func (b *BaseController) UserProvider() (UserProvider, error)
type BaseDefaultObjectRole ¶ added in v0.1.0
type BaseDefaultObjectRole struct {
Self DefaultObjectRole
}
BaseDefaultObjectRole contains useful common functionality that should be shared by all implementations of the interface, such as validation.
func (*BaseDefaultObjectRole) Create ¶ added in v0.1.0
func (b *BaseDefaultObjectRole) Create(values map[string]interface{}) error
func (*BaseDefaultObjectRole) MarshalJSON ¶ added in v0.1.0
func (b *BaseDefaultObjectRole) MarshalJSON() ([]byte, error)
func (*BaseDefaultObjectRole) Type ¶ added in v0.1.0
func (b *BaseDefaultObjectRole) Type() string
func (*BaseDefaultObjectRole) Update ¶ added in v0.1.0
func (b *BaseDefaultObjectRole) Update(values map[string]interface{}) error
type BaseObjectRole ¶
type BaseObjectRole struct {
Self ObjectRole
}
BaseObjectRole contains useful common functionality that should be shared by all implementations of the interface, such as validation.
func (*BaseObjectRole) Create ¶
func (b *BaseObjectRole) Create(values map[string]interface{}) error
func (*BaseObjectRole) MarshalJSON ¶
func (b *BaseObjectRole) MarshalJSON() ([]byte, error)
func (*BaseObjectRole) Type ¶
func (b *BaseObjectRole) Type() string
func (*BaseObjectRole) Update ¶
func (b *BaseObjectRole) Update(values map[string]interface{}) error
type BaseOrganization ¶
type BaseOrganization struct { Self Organization Controller_ Controller }
func (*BaseOrganization) Controller ¶
func (b *BaseOrganization) Controller() Controller
func (*BaseOrganization) Create ¶
func (b *BaseOrganization) Create(values map[string]interface{}) error
func (*BaseOrganization) MarshalJSON ¶
func (b *BaseOrganization) MarshalJSON() ([]byte, error)
func (*BaseOrganization) Type ¶
func (b *BaseOrganization) Type() string
func (*BaseOrganization) Update ¶
func (b *BaseOrganization) Update(values map[string]interface{}) error
type BaseUser ¶ added in v0.1.0
type BaseUser struct { Self User Controller_ Controller }
func (*BaseUser) Controller ¶ added in v0.1.0
func (b *BaseUser) Controller() Controller
func (*BaseUser) MarshalJSON ¶ added in v0.1.0
type Blueprint ¶
type Blueprint struct {
// contains filtered or unexported fields
}
func MakeBlueprint ¶
func (*Blueprint) Create ¶
func (b *Blueprint) Create(controller Controller) error
type Change ¶ added in v0.1.0
type Change struct { Op Op `json:"op"` Value any `json:"value"` Path []PathElement `json:"path"` Description string `json:"description"` }
func Diff ¶ added in v0.1.0
Returns the difference between two data structures as a sequence of changes
func DiffWithOptions ¶ added in v0.1.0
func DiffWithOptions(a, b any, options DiffOptions) []Change
type ChangeRequest ¶ added in v0.1.0
type ChangeRequest interface { kodex.Model Title() string SetTitle(string) error Description() string SetDescription(string) error SetData(interface{}) error Data() interface{} Changes() []ChangeSet SetChanges([]ChangeSet) error SetStatus(ChangeRequestStatus) error Status() ChangeRequestStatus Reviews() ([]ChangeRequestReview, error) MakeReview(User) (ChangeRequestReview, error) Review([]byte) (ChangeRequestReview, error) Creator() User ObjectID() []byte ObjectType() string }
type ChangeRequestReview ¶ added in v0.1.0
type ChangeRequestReview interface { kodex.Model Description() string SetDescription(string) error SetData(interface{}) error Data() interface{} SetStatus(ChangeRequestReviewStatus) error Status() ChangeRequestReviewStatus ChangeRequest() ChangeRequest Creator() User }
type ChangeRequestReviewStatus ¶ added in v0.1.0
type ChangeRequestReviewStatus string
const ( ReviewRequested ChangeRequestReviewStatus = "requested" RequestRejected ChangeRequestReviewStatus = "rejected" RequestApproved ChangeRequestReviewStatus = "approved" )
type ChangeRequestStatus ¶ added in v0.1.0
type ChangeRequestStatus string
const ( DraftCR ChangeRequestStatus = "draft" ReadyCR ChangeRequestStatus = "ready" WithdrawnCR ChangeRequestStatus = "withdrawn" ApprovedCR ChangeRequestStatus = "approved" RejectedCR ChangeRequestStatus = "rejected" )
type CommentStatus ¶ added in v0.1.0
type CommentStatus string
const ( DraftComment CommentStatus = "draft" PublishedComment CommentStatus = "published" DeletedComment CommentStatus = "deleted" )
type Controller ¶
type Controller interface { kodex.Controller // Clone the controller ApiClone() (Controller, error) KodexController() kodex.Controller RegisterAPIPlugin(APIPlugin) error APIDefinitions() *Definitions // User provider UserProvider() (UserProvider, error) // Object roles CanAccess(user *ExternalUser, object kodex.Model, objectRoles []string) (bool, error) ObjectRole(id []byte) (ObjectRole, error) RolesForObject(object kodex.Model) ([]ObjectRole, error) ObjectRolesForUser(objectType string, user *ExternalUser) ([]ObjectRole, error) ObjectRolesForOrganizationRoles(objectType string, organizationRoles []string, organizationID []byte) ([]ObjectRole, error) MakeObjectRole(object kodex.Model, organization Organization) ObjectRole // Default object roles DefaultObjectRoles(organizationID []byte) ([]DefaultObjectRole, error) DefaultObjectRole(id []byte) (DefaultObjectRole, error) MakeDefaultObjectRole(objectType string, organization Organization) DefaultObjectRole // Change request ChangeRequests(object kodex.Model) ([]ChangeRequest, error) ChangeRequest(id []byte) (ChangeRequest, error) MakeChangeRequest(id []byte, object kodex.Model, user User) (ChangeRequest, error) // Users MakeUser() User User(source string, sourceID []byte) (User, error) Users(filters map[string]interface{}) ([]User, error) // Organizations MakeOrganization() Organization Organization(source string, sourceID []byte) (Organization, error) Organizations(filters map[string]interface{}) ([]Organization, error) }
type CreateObjectAdaptor ¶
type CreateUserProvider ¶
type CreateUserProvider interface {
Create(user *ExternalUser) error
}
type DefaultObjectRole ¶ added in v0.1.0
type Definitions ¶
type Definitions struct { kodex.Definitions Routes []Routes APIControllerDefinitions APIControllerDefinitions ObjectAdaptors map[string]ObjectAdaptor AssociateAdaptors map[string]AssociateAdaptor UserProviders map[string]UserProviderDefinition }
func MergeDefinitions ¶
func MergeDefinitions(a, b Definitions) Definitions
func (Definitions) Marshal ¶
func (d Definitions) Marshal() map[string]interface{}
func (Definitions) MarshalJSON ¶
func (d Definitions) MarshalJSON() ([]byte, error)
type DiffOptions ¶ added in v0.1.0
type DiffOptions struct {
Identifiers []string
}
type ExternalUser ¶ added in v0.1.0
type ExternalUser struct { Source string `json:"source"` SourceID []byte `json:"sourceID"` Email string `json:"email"` DisplayName string `json:"displayName"` Superuser bool `json:"superuser"` AccessToken *AccessToken `json:"accessToken"` Roles []*OrganizationRoles `json:"roles"` Limits map[string]interface{} `json:"limits"` // contains filtered or unexported fields }
func MakeUser ¶
func MakeUser(source, email string, superuser bool, roles []*OrganizationRoles, limits map[string]interface{}, token *AccessToken) *ExternalUser
func (*ExternalUser) ApiUser ¶ added in v0.1.0
func (i *ExternalUser) ApiUser(controller Controller) (User, error)
type IsChangeRequestReviewStatus ¶ added in v0.1.0
type IsChangeRequestReviewStatus struct{}
func (IsChangeRequestReviewStatus) Validate ¶ added in v0.1.0
func (i IsChangeRequestReviewStatus) Validate(value interface{}, values map[string]interface{}) (interface{}, error)
type IsChangeRequestStatus ¶ added in v0.1.0
type IsChangeRequestStatus struct{}
func (IsChangeRequestStatus) Validate ¶ added in v0.1.0
func (i IsChangeRequestStatus) Validate(value interface{}, values map[string]interface{}) (interface{}, error)
type IsCommentStatus ¶ added in v0.1.0
type IsCommentStatus struct{}
func (IsCommentStatus) Validate ¶ added in v0.1.0
func (i IsCommentStatus) Validate(value interface{}, values map[string]interface{}) (interface{}, error)
type ListAllObjectAdaptor ¶
type ObjectAdaptor ¶
type ObjectRole ¶
type ObjectRoleSpec ¶
type Organization ¶
type OrganizationRoles ¶
type OrganizationRoles struct { Roles []string `json:"roles"` Organization *UserOrganization `json:"organization"` }
func MakeOrganizationRoles ¶
func MakeOrganizationRoles(org *UserOrganization, roles []string) *OrganizationRoles
type PathElement ¶ added in v0.1.0
type PathElement struct { PathType PathType `json:"pathType"` Name string `json:"name"` Index int `json:"index"` Identifier string `json:"identifier"` Value any `json:"value"` }
func ArrayPath ¶ added in v0.1.0
func ArrayPath(index int) PathElement
func ByIdPath ¶ added in v0.1.0
func ByIdPath(identifier string, value any) PathElement
func DirectPath ¶ added in v0.1.0
func DirectPath(name string) PathElement
func (PathElement) String ¶ added in v0.1.0
func (p PathElement) String() string
type Routes ¶
type Routes func(*gin.RouterGroup, Controller, kodex.Meter) error
type Settings ¶
type Settings struct {
UserProvider *UserProviderSettings `json:"userProvider"`
}
type SettingsValidator ¶
type UpdateObjectAdaptor ¶
type UserOrganization ¶
type UserOrganization struct { Source string `json:"source"` Name string `json:"name"` Default bool `json:"default"` Description string `json:"description"` ID []byte `json:"id"` // contains filtered or unexported fields }
func MakeUserOrganization ¶
func MakeUserOrganization(source, name, description string, id []byte) *UserOrganization
func (*UserOrganization) ApiOrganization ¶
func (i *UserOrganization) ApiOrganization(controller Controller) (Organization, error)
type UserProvider ¶
type UserProvider interface { Initialize(controller Controller, group *gin.RouterGroup) error Logout(controller Controller, request *http.Request, writer http.ResponseWriter) error Get(controller Controller, request *http.Request) (*ExternalUser, error) }
type UserProviderDefinition ¶
type UserProviderDefinition struct { Name string `json:"name"` Description string `json:"description"` Maker UserProviderMaker `json:"-"` SettingsValidator SettingsValidator `json:"-"` }
type UserProviderDefinitions ¶
type UserProviderDefinitions map[string]UserProviderDefinition
type UserProviderMaker ¶
type UserProviderMaker func(settings kodex.Settings) (UserProvider, error)
type UserProviderPlugin ¶ added in v0.1.0
type UserProviderPlugin interface {
InitializeUserProviders(map[string]UserProviderDefinition) error
}
type UserProviderSettings ¶
type UserProviderSettings struct { Type string `json:"type"` Settings interface{} `json:"settings"` }
type UsersAndRoles ¶
type UsersAndRoles struct { Users []*ExternalUser `json:"users"` Roles []*ObjectRoleSpec `json:"roles"` }
Source Files ¶
- auth.go
- base_controller.go
- base_default_object_role.go
- base_object_role.go
- base_organization.go
- base_user.go
- blueprint.go
- change_request.go
- change_request_review.go
- changes.go
- comment.go
- controller.go
- default_object_role.go
- definitions.go
- errors.go
- object_role.go
- organization.go
- plugin.go
- settings.go
- user.go
Directories ¶
Path | Synopsis |
---|---|
resources/pcap/pcapgo
Package pcapgo provides some native PCAP support, not requiring C libpcap to be installed.
|
Package pcapgo provides some native PCAP support, not requiring C libpcap to be installed. |
Click to show internal directories.
Click to hide internal directories.