controllers

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Controllers = map[string]api.APIControllerMaker{
	"inMemory": MakeInMemoryController,
}

Functions

func MakeInMemoryChangeRequest added in v0.1.0

func MakeInMemoryChangeRequest(id []byte, objectType string, objectID []byte, user api.User, controller *InMemoryController) api.ChangeRequest

func MakeInMemoryChangeRequestReview added in v0.1.0

func MakeInMemoryChangeRequestReview(changeRequest *InMemoryChangeRequest, creator *InMemoryUser) api.ChangeRequestReview

func MakeInMemoryController

func MakeInMemoryController(config map[string]interface{}, controller kodex.Controller, definitions *api.Definitions) (api.Controller, error)

func MakeInMemoryDefaultObjectRole added in v0.1.0

func MakeInMemoryDefaultObjectRole(id, organizationID []byte, objectType string, controller *InMemoryController) api.DefaultObjectRole

func MakeInMemoryObjectRole

func MakeInMemoryObjectRole(id, organizationID, objectID []byte, objectType string, controller *InMemoryController) api.ObjectRole

Types

type InMemoryChangeRequest added in v0.1.0

type InMemoryChangeRequest struct {
	api.BaseChangeRequest
	// contains filtered or unexported fields
}

func (*InMemoryChangeRequest) Changes added in v0.1.0

func (c *InMemoryChangeRequest) Changes() []api.ChangeSet

func (*InMemoryChangeRequest) CreatedAt added in v0.1.0

func (c *InMemoryChangeRequest) CreatedAt() time.Time

func (*InMemoryChangeRequest) Data added in v0.1.0

func (c *InMemoryChangeRequest) Data() interface{}

func (*InMemoryChangeRequest) Delete added in v0.1.0

func (c *InMemoryChangeRequest) Delete() error

func (*InMemoryChangeRequest) DeleteChangeRequestReview added in v0.1.0

func (c *InMemoryChangeRequest) DeleteChangeRequestReview(review api.ChangeRequestReview) error

func (*InMemoryChangeRequest) DeletedAt added in v0.1.0

func (c *InMemoryChangeRequest) DeletedAt() *time.Time

func (*InMemoryChangeRequest) Description added in v0.1.0

func (c *InMemoryChangeRequest) Description() string

func (*InMemoryChangeRequest) ID added in v0.1.0

func (c *InMemoryChangeRequest) ID() []byte

func (*InMemoryChangeRequest) MakeReview added in v0.1.0

func (c *InMemoryChangeRequest) MakeReview(user api.User) (api.ChangeRequestReview, error)

func (*InMemoryChangeRequest) ObjectID added in v0.1.0

func (c *InMemoryChangeRequest) ObjectID() []byte

func (*InMemoryChangeRequest) ObjectType added in v0.1.0

func (c *InMemoryChangeRequest) ObjectType() string

func (*InMemoryChangeRequest) Refresh added in v0.1.0

func (c *InMemoryChangeRequest) Refresh() error

func (*InMemoryChangeRequest) Review added in v0.1.0

func (*InMemoryChangeRequest) Reviews added in v0.1.0

func (*InMemoryChangeRequest) Save added in v0.1.0

func (c *InMemoryChangeRequest) Save() error

func (*InMemoryChangeRequest) SaveChangeRequestReview added in v0.1.0

func (c *InMemoryChangeRequest) SaveChangeRequestReview(review api.ChangeRequestReview) error

func (*InMemoryChangeRequest) SetChanges added in v0.1.0

func (c *InMemoryChangeRequest) SetChanges(changes []api.ChangeSet) error

func (*InMemoryChangeRequest) SetData added in v0.1.0

func (c *InMemoryChangeRequest) SetData(data interface{}) error

func (*InMemoryChangeRequest) SetDescription added in v0.1.0

func (c *InMemoryChangeRequest) SetDescription(description string) error

func (*InMemoryChangeRequest) SetStatus added in v0.1.0

func (c *InMemoryChangeRequest) SetStatus(status api.ChangeRequestStatus) error

func (*InMemoryChangeRequest) SetTitle added in v0.1.0

func (c *InMemoryChangeRequest) SetTitle(title string) error

func (*InMemoryChangeRequest) Status added in v0.1.0

func (*InMemoryChangeRequest) Title added in v0.1.0

func (c *InMemoryChangeRequest) Title() string

func (*InMemoryChangeRequest) UpdatedAt added in v0.1.0

func (c *InMemoryChangeRequest) UpdatedAt() time.Time

type InMemoryChangeRequestReview added in v0.1.0

type InMemoryChangeRequestReview struct {
	api.BaseChangeRequestReview
	// contains filtered or unexported fields
}

func (*InMemoryChangeRequestReview) ChangeRequest added in v0.1.0

func (c *InMemoryChangeRequestReview) ChangeRequest() api.ChangeRequest

func (*InMemoryChangeRequestReview) CreatedAt added in v0.1.0

func (c *InMemoryChangeRequestReview) CreatedAt() time.Time

func (*InMemoryChangeRequestReview) Data added in v0.1.0

func (c *InMemoryChangeRequestReview) Data() interface{}

func (*InMemoryChangeRequestReview) Delete added in v0.1.0

func (c *InMemoryChangeRequestReview) Delete() error

func (*InMemoryChangeRequestReview) DeletedAt added in v0.1.0

func (c *InMemoryChangeRequestReview) DeletedAt() *time.Time

func (*InMemoryChangeRequestReview) Description added in v0.1.0

func (c *InMemoryChangeRequestReview) Description() string

func (*InMemoryChangeRequestReview) ID added in v0.1.0

func (*InMemoryChangeRequestReview) Refresh added in v0.1.0

func (c *InMemoryChangeRequestReview) Refresh() error

func (*InMemoryChangeRequestReview) Save added in v0.1.0

func (*InMemoryChangeRequestReview) SetData added in v0.1.0

func (c *InMemoryChangeRequestReview) SetData(data interface{}) error

func (*InMemoryChangeRequestReview) SetDescription added in v0.1.0

func (c *InMemoryChangeRequestReview) SetDescription(description string) error

func (*InMemoryChangeRequestReview) SetStatus added in v0.1.0

func (*InMemoryChangeRequestReview) Status added in v0.1.0

func (*InMemoryChangeRequestReview) UpdatedAt added in v0.1.0

func (c *InMemoryChangeRequestReview) UpdatedAt() time.Time

type InMemoryController

type InMemoryController struct {
	api.BaseController

	*kodexControllers.InMemoryController
	// contains filtered or unexported fields
}

func (*InMemoryController) ApiClone added in v0.1.0

func (m *InMemoryController) ApiClone() (api.Controller, error)

func (*InMemoryController) ChangeRequest added in v0.1.0

func (c *InMemoryController) ChangeRequest(id []byte) (api.ChangeRequest, error)

func (*InMemoryController) ChangeRequests added in v0.1.0

func (c *InMemoryController) ChangeRequests(object kodex.Model) ([]api.ChangeRequest, error)

func (*InMemoryController) DefaultObjectRole added in v0.1.0

func (m *InMemoryController) DefaultObjectRole(id []byte) (api.DefaultObjectRole, error)

func (*InMemoryController) DefaultObjectRoles added in v0.1.0

func (m *InMemoryController) DefaultObjectRoles(organizationID []byte) ([]api.DefaultObjectRole, error)

func (*InMemoryController) DeleteChangeRequest added in v0.1.0

func (m *InMemoryController) DeleteChangeRequest(changeRequest *InMemoryChangeRequest) error

func (*InMemoryController) DeleteDefaultObjectRole added in v0.1.0

func (m *InMemoryController) DeleteDefaultObjectRole(objectRole *InMemoryDefaultObjectRole) error

func (*InMemoryController) DeleteObjectRole

func (m *InMemoryController) DeleteObjectRole(objectRole *InMemoryObjectRole) error

func (*InMemoryController) KodexController

func (m *InMemoryController) KodexController() kodex.Controller

func (*InMemoryController) MakeChangeRequest added in v0.1.0

func (c *InMemoryController) MakeChangeRequest(id []byte, object kodex.Model, user api.User) (api.ChangeRequest, error)

func (*InMemoryController) MakeDefaultObjectRole added in v0.1.0

func (m *InMemoryController) MakeDefaultObjectRole(objectType string, organization api.Organization) api.DefaultObjectRole

func (*InMemoryController) MakeObjectRole

func (m *InMemoryController) MakeObjectRole(object kodex.Model, organization api.Organization) api.ObjectRole

func (*InMemoryController) MakeOrganization

func (c *InMemoryController) MakeOrganization() api.Organization

func (*InMemoryController) MakeUser added in v0.1.0

func (c *InMemoryController) MakeUser() api.User

func (*InMemoryController) ObjectRole

func (m *InMemoryController) ObjectRole(id []byte) (api.ObjectRole, error)

func (*InMemoryController) ObjectRolesForOrganizationRoles

func (m *InMemoryController) ObjectRolesForOrganizationRoles(objectType string, organizationRoles []string, organizationID []byte) ([]api.ObjectRole, error)

func (*InMemoryController) Organization

func (c *InMemoryController) Organization(source string, sourceID []byte) (api.Organization, error)

func (*InMemoryController) Organizations

func (c *InMemoryController) Organizations(filters map[string]interface{}) ([]api.Organization, error)

func (*InMemoryController) RolesForObject

func (m *InMemoryController) RolesForObject(object kodex.Model) ([]api.ObjectRole, error)

func (*InMemoryController) SaveChangeRequest added in v0.1.0

func (m *InMemoryController) SaveChangeRequest(changeRequest *InMemoryChangeRequest) error

func (*InMemoryController) SaveDefaultObjectRole added in v0.1.0

func (m *InMemoryController) SaveDefaultObjectRole(objectRole *InMemoryDefaultObjectRole) error

func (*InMemoryController) SaveObjectRole

func (m *InMemoryController) SaveObjectRole(objectRole *InMemoryObjectRole) error

func (*InMemoryController) SaveOrganization

func (c *InMemoryController) SaveOrganization(organization *InMemoryOrganization) error

func (*InMemoryController) SaveUser added in v0.1.0

func (c *InMemoryController) SaveUser(user *InMemoryUser) error

func (*InMemoryController) User added in v0.1.0

func (c *InMemoryController) User(source string, sourceID []byte) (api.User, error)

func (*InMemoryController) Users added in v0.1.0

func (c *InMemoryController) Users(filters map[string]interface{}) ([]api.User, error)

type InMemoryDefaultObjectRole added in v0.1.0

type InMemoryDefaultObjectRole struct {
	api.BaseDefaultObjectRole
	// contains filtered or unexported fields
}

func (*InMemoryDefaultObjectRole) CreatedAt added in v0.1.0

func (c *InMemoryDefaultObjectRole) CreatedAt() time.Time

func (*InMemoryDefaultObjectRole) Delete added in v0.1.0

func (c *InMemoryDefaultObjectRole) Delete() error

func (*InMemoryDefaultObjectRole) DeletedAt added in v0.1.0

func (c *InMemoryDefaultObjectRole) DeletedAt() *time.Time

func (*InMemoryDefaultObjectRole) ID added in v0.1.0

func (c *InMemoryDefaultObjectRole) ID() []byte

func (*InMemoryDefaultObjectRole) ObjectRole added in v0.1.0

func (c *InMemoryDefaultObjectRole) ObjectRole() string

func (*InMemoryDefaultObjectRole) ObjectType added in v0.1.0

func (c *InMemoryDefaultObjectRole) ObjectType() string

func (*InMemoryDefaultObjectRole) OrganizationID added in v0.1.0

func (c *InMemoryDefaultObjectRole) OrganizationID() []byte

func (*InMemoryDefaultObjectRole) OrganizationRole added in v0.1.0

func (c *InMemoryDefaultObjectRole) OrganizationRole() string

func (*InMemoryDefaultObjectRole) Refresh added in v0.1.0

func (c *InMemoryDefaultObjectRole) Refresh() error

func (*InMemoryDefaultObjectRole) Save added in v0.1.0

func (c *InMemoryDefaultObjectRole) Save() error

func (*InMemoryDefaultObjectRole) SetObjectRole added in v0.1.0

func (c *InMemoryDefaultObjectRole) SetObjectRole(role string) error

func (*InMemoryDefaultObjectRole) SetOrganizationRole added in v0.1.0

func (c *InMemoryDefaultObjectRole) SetOrganizationRole(role string) error

func (*InMemoryDefaultObjectRole) UpdatedAt added in v0.1.0

func (c *InMemoryDefaultObjectRole) UpdatedAt() time.Time

type InMemoryObjectRole

type InMemoryObjectRole struct {
	api.BaseObjectRole
	// contains filtered or unexported fields
}

func (*InMemoryObjectRole) CreatedAt

func (c *InMemoryObjectRole) CreatedAt() time.Time

func (*InMemoryObjectRole) Delete

func (c *InMemoryObjectRole) Delete() error

func (*InMemoryObjectRole) DeletedAt

func (c *InMemoryObjectRole) DeletedAt() *time.Time

func (*InMemoryObjectRole) ID

func (c *InMemoryObjectRole) ID() []byte

func (*InMemoryObjectRole) ObjectID

func (c *InMemoryObjectRole) ObjectID() []byte

func (*InMemoryObjectRole) ObjectRole

func (c *InMemoryObjectRole) ObjectRole() string

func (*InMemoryObjectRole) ObjectType

func (c *InMemoryObjectRole) ObjectType() string

func (*InMemoryObjectRole) OrganizationID

func (c *InMemoryObjectRole) OrganizationID() []byte

func (*InMemoryObjectRole) OrganizationRole

func (c *InMemoryObjectRole) OrganizationRole() string

func (*InMemoryObjectRole) Refresh

func (c *InMemoryObjectRole) Refresh() error

func (*InMemoryObjectRole) Save

func (c *InMemoryObjectRole) Save() error

func (*InMemoryObjectRole) SetObjectID

func (c *InMemoryObjectRole) SetObjectID(id []byte) error

func (*InMemoryObjectRole) SetObjectRole

func (c *InMemoryObjectRole) SetObjectRole(role string) error

func (*InMemoryObjectRole) SetOrganizationRole

func (c *InMemoryObjectRole) SetOrganizationRole(role string) error

func (*InMemoryObjectRole) UpdatedAt

func (c *InMemoryObjectRole) UpdatedAt() time.Time

type InMemoryOrganization

type InMemoryOrganization struct {
	api.BaseOrganization
	// contains filtered or unexported fields
}

func MakeInMemoryOrganization

func MakeInMemoryOrganization(id []byte,
	controller api.Controller) *InMemoryOrganization

func (*InMemoryOrganization) CreatedAt

func (i *InMemoryOrganization) CreatedAt() time.Time

func (*InMemoryOrganization) Data

func (i *InMemoryOrganization) Data() interface{}

func (*InMemoryOrganization) Delete

func (i *InMemoryOrganization) Delete() error

func (*InMemoryOrganization) DeletedAt

func (i *InMemoryOrganization) DeletedAt() *time.Time

func (*InMemoryOrganization) Description

func (i *InMemoryOrganization) Description() string

func (*InMemoryOrganization) ID

func (i *InMemoryOrganization) ID() []byte

func (*InMemoryOrganization) Name

func (i *InMemoryOrganization) Name() string

func (*InMemoryOrganization) Refresh

func (i *InMemoryOrganization) Refresh() error

func (*InMemoryOrganization) Save

func (i *InMemoryOrganization) Save() error

func (*InMemoryOrganization) SetData

func (i *InMemoryOrganization) SetData(data interface{}) error

func (*InMemoryOrganization) SetDescription

func (i *InMemoryOrganization) SetDescription(description string) error

func (*InMemoryOrganization) SetName

func (i *InMemoryOrganization) SetName(name string) error

func (*InMemoryOrganization) SetSource

func (i *InMemoryOrganization) SetSource(source string) error

func (*InMemoryOrganization) SetSourceID

func (i *InMemoryOrganization) SetSourceID(sourceID []byte) error

func (*InMemoryOrganization) Source

func (i *InMemoryOrganization) Source() string

func (*InMemoryOrganization) SourceID

func (i *InMemoryOrganization) SourceID() []byte

func (*InMemoryOrganization) UpdatedAt

func (i *InMemoryOrganization) UpdatedAt() time.Time

type InMemoryUser added in v0.1.0

type InMemoryUser struct {
	api.BaseUser
	// contains filtered or unexported fields
}

func MakeInMemoryUser added in v0.1.0

func MakeInMemoryUser(id []byte,
	controller api.Controller) *InMemoryUser

func (*InMemoryUser) CreatedAt added in v0.1.0

func (i *InMemoryUser) CreatedAt() time.Time

func (*InMemoryUser) Data added in v0.1.0

func (i *InMemoryUser) Data() interface{}

func (*InMemoryUser) Delete added in v0.1.0

func (i *InMemoryUser) Delete() error

func (*InMemoryUser) DeletedAt added in v0.1.0

func (i *InMemoryUser) DeletedAt() *time.Time

func (*InMemoryUser) DisplayName added in v0.1.0

func (i *InMemoryUser) DisplayName() string

func (*InMemoryUser) Email added in v0.1.0

func (i *InMemoryUser) Email() string

func (*InMemoryUser) ID added in v0.1.0

func (i *InMemoryUser) ID() []byte

func (*InMemoryUser) Refresh added in v0.1.0

func (i *InMemoryUser) Refresh() error

func (*InMemoryUser) Save added in v0.1.0

func (i *InMemoryUser) Save() error

func (*InMemoryUser) SetData added in v0.1.0

func (i *InMemoryUser) SetData(data interface{}) error

func (*InMemoryUser) SetDisplayName added in v0.1.0

func (i *InMemoryUser) SetDisplayName(displayName string) error

func (*InMemoryUser) SetEmail added in v0.1.0

func (i *InMemoryUser) SetEmail(email string) error

func (*InMemoryUser) SetSource added in v0.1.0

func (i *InMemoryUser) SetSource(source string) error

func (*InMemoryUser) SetSourceID added in v0.1.0

func (i *InMemoryUser) SetSourceID(sourceID []byte) error

func (*InMemoryUser) SetSuperuser added in v0.1.0

func (i *InMemoryUser) SetSuperuser(superuser bool) error

func (*InMemoryUser) Source added in v0.1.0

func (i *InMemoryUser) Source() string

func (*InMemoryUser) SourceID added in v0.1.0

func (i *InMemoryUser) SourceID() []byte

func (*InMemoryUser) Superuser added in v0.1.0

func (i *InMemoryUser) Superuser() bool

func (*InMemoryUser) UpdatedAt added in v0.1.0

func (i *InMemoryUser) UpdatedAt() time.Time

Jump to

Keyboard shortcuts

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