Documentation ¶
Index ¶
- type AuditService
- type AuthenticationService
- type AuthorizationService
- type BackendProviderService
- type CheckRecordAccessParams
- type Container
- type DataSourceService
- type EventChannelService
- type ExecuteActionParams
- type ExtensionService
- type ExternalService
- type MetricsInterval
- type MetricsOperation
- type MetricsRequest
- type MetricsResponseItem
- type MetricsService
- type RecordCreateParams
- type RecordDeleteParams
- type RecordGetParams
- type RecordListParams
- type RecordService
- type RecordUpdateParams
- type ResourceMigrationService
- type ResourceService
- type StatsService
- type WatchParams
- type WatchResourceParams
- type WatchService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditService ¶ added in v1.1.90
type AuthenticationService ¶ added in v1.1.37
type AuthenticationService interface { Init(config *model.AppConfig) Authenticate(ctx context.Context, username string, password string, term model.TokenTerm) (*model.Token, errors.ServiceError) RenewToken(ctx context.Context, token string, term model.TokenTerm) (*model.Token, errors.ServiceError) ParseAndVerifyToken(token string) (*jwt_model.UserDetails, errors.ServiceError) AuthenticationDisabled() bool }
type AuthorizationService ¶ added in v1.1.37
type AuthorizationService interface { CheckRecordAccess(ctx context.Context, params CheckRecordAccessParams) errors.ServiceError CheckRecordAccessWithRecordSelector(ctx context.Context, params CheckRecordAccessParams) (*resource_model.BooleanExpression, errors.ServiceError) CheckIsExtensionController(ctx context.Context) errors.ServiceError }
type BackendProviderService ¶ added in v1.1.37
type BackendProviderService interface { abs.BackendRecordsInterface abs.BackendActionExecutor DestroyDataSource(ctx context.Context, dataSourceName string) errors.ServiceError ListEntities(ctx context.Context, dataSourceId string) ([]*model.DataSourceCatalog, errors.ServiceError) PrepareResourceFromEntity(ctx context.Context, dataSourceName string, catalog, entity string) (*model.Resource, errors.ServiceError) UpgradeResource(ctx context.Context, dataSourceName string, params abs.UpgradeResourceParams) errors.ServiceError GetStatus(ctx context.Context, dataSourceId string) (connectionAlreadyInitiated bool, testConnection bool, err errors.ServiceError) Init(config *model.AppConfig) SetSchema(schema *abs.Schema) }
type CheckRecordAccessParams ¶ added in v1.1.37
type CheckRecordAccessParams struct { Resource *model.Resource Records *[]*model.Record Operation resource_model.PermissionOperation }
type Container ¶ added in v1.1.37
type Container interface { GetRecordService() RecordService GetEventChannelService() EventChannelService GetAuthenticationService() AuthenticationService GetAuthorizationService() AuthorizationService GetResourceService() ResourceService GetMetricsService() MetricsService GetResourceMigrationService() ResourceMigrationService GetDataSourceService() DataSourceService GetWatchService() WatchService GetExtensionService() ExtensionService }
type DataSourceService ¶ added in v1.1.37
type DataSourceService interface { Init(config *model.AppConfig) ListEntities(ctx context.Context, id string) ([]*model.DataSourceCatalog, errors.ServiceError) GetStatus(ctx context.Context, id string) (connectionAlreadyInitiated bool, testConnection bool, err errors.ServiceError) PrepareResourceFromEntity(ctx context.Context, dataSourceId string, catalog, entity string) (*model.Resource, errors.ServiceError) Delete(ctx context.Context, ids []string) errors.ServiceError }
type EventChannelService ¶ added in v1.1.48
type EventChannelService interface { Exec(ctx context.Context, channelKey string, event *model.Event) (*model.Event, errors.ServiceError) PollEvents(ctx context.Context, channelKey string) (chan *model.Event, errors.ServiceError) WriteEvent(ctx context.Context, proto *model.Event) errors.ServiceError Init(config *model.AppConfig) }
type ExecuteActionParams ¶ added in v1.2.21
type ExecuteActionParams struct { Namespace string Resource string Id string ActionName string Input unstructured.Unstructured }
type ExtensionService ¶ added in v1.1.37
type ExtensionService interface { RegisterExtension(*resource_model.Extension) UnRegisterExtension(*resource_model.Extension) Init(config *model.AppConfig) Reload() }
type ExternalService ¶ added in v1.1.37
type ExternalService interface {
Call(ctx context.Context, all resource_model.ExternalCall, event *model.Event) (*model.Event, errors.ServiceError)
}
type MetricsInterval ¶ added in v1.1.37
type MetricsInterval string
const ( MetricsIntervalMinute MetricsInterval = "minute" MetricsIntervalHour MetricsInterval = "hour" MetricsIntervalDay MetricsInterval = "day" MetricsIntervalWeek MetricsInterval = "week" MetricsIntervalMonth MetricsInterval = "month" )
type MetricsOperation ¶ added in v1.1.37
type MetricsOperation string
const ( MetricsOperationRead MetricsOperation = "read" MetricsOperationWrite MetricsOperation = "write" MetricsOperationDelete MetricsOperation = "delete" )
type MetricsRequest ¶ added in v1.1.37
type MetricsRequest struct { Namespace *string `json:"namespace"` Resource *string `json:"resource"` Operation *MetricsOperation `json:"operation"` Interval *MetricsInterval `json:"interval"` From *time.Time To *time.Time }
type MetricsResponseItem ¶ added in v1.1.37
type MetricsResponseItem struct { Namespace string `json:"namespace"` Resource string `json:"resource"` Interval MetricsInterval `json:"interval"` Operation MetricsOperation `json:"operation"` Time time.Time `json:"time"` Count uint64 `json:"count"` }
type MetricsService ¶ added in v1.1.37
type MetricsService interface { Init(config *model.AppConfig) GetMetrics(req MetricsRequest) ([]MetricsResponseItem, errors.ServiceError) }
type RecordCreateParams ¶ added in v1.1.37
func (RecordCreateParams) ToRequest ¶ added in v1.1.37
func (p RecordCreateParams) ToRequest() *stub.CreateRecordRequest
type RecordDeleteParams ¶ added in v1.1.37
func (RecordDeleteParams) ToRequest ¶ added in v1.1.37
func (p RecordDeleteParams) ToRequest() *stub.DeleteRecordRequest
type RecordGetParams ¶ added in v1.1.37
type RecordListParams ¶ added in v1.1.37
type RecordListParams struct { Query *model.BooleanExpression Namespace string Resource string Limit uint32 Offset uint64 UseHistory bool ResolveReferences []string ResultChan chan<- *model.Record PackRecords bool Filters map[string]string }
func (RecordListParams) ToRequest ¶ added in v1.1.37
func (p RecordListParams) ToRequest() *stub.ListRecordRequest
type RecordService ¶ added in v1.1.37
type RecordService interface { Init(config *model.AppConfig) PrepareQuery(resource *model.Resource, queryMap map[string]string) (*model.BooleanExpression, errors.ServiceError) GetRecord(ctx context.Context, namespace, resourceName, id string, references []string) (*model.Record, errors.ServiceError) FindBy(ctx context.Context, namespace, resourceName, propertyName string, value string) (*model.Record, errors.ServiceError) ResolveReferences(ctx context.Context, resource *model.Resource, records []*model.Record, referencesToResolve []string) errors.ServiceError List(ctx context.Context, params RecordListParams) ([]*model.Record, uint32, errors.ServiceError) Create(ctx context.Context, params RecordCreateParams) ([]*model.Record, errors.ServiceError) Update(ctx context.Context, params RecordUpdateParams) ([]*model.Record, errors.ServiceError) Apply(ctx context.Context, params RecordUpdateParams) ([]*model.Record, errors.ServiceError) Get(ctx context.Context, params RecordGetParams) (*model.Record, errors.ServiceError) Delete(ctx context.Context, params RecordDeleteParams) errors.ServiceError ExecuteAction(ctx context.Context, params ExecuteActionParams) (unstructured.Unstructured, errors.ServiceError) }
type RecordUpdateParams ¶ added in v1.1.37
func (RecordUpdateParams) ToRequest ¶ added in v1.1.37
func (p RecordUpdateParams) ToRequest() *stub.UpdateRecordRequest
type ResourceMigrationService ¶ added in v1.1.37
type ResourceMigrationService interface {
PreparePlan(ctx context.Context, existingResource *model.Resource, resource *model.Resource) (*model.ResourceMigrationPlan, errors.ServiceError)
}
type ResourceService ¶ added in v1.1.37
type ResourceService interface { Init(config *model.AppConfig) GetResourceByName(ctx context.Context, namespace, resource string) (*model.Resource, errors.ServiceError) GetSystemResourceByName(ctx context.Context, resourceName string) (*model.Resource, errors.ServiceError) Create(ctx context.Context, resource *model.Resource, doMigration bool, forceMigration bool) (*model.Resource, errors.ServiceError) Update(ctx context.Context, resource *model.Resource, doMigration bool, forceMigration bool) errors.ServiceError Delete(ctx context.Context, ids []string, doMigration bool, forceMigration bool) errors.ServiceError List(ctx context.Context) ([]*model.Resource, errors.ServiceError) Get(ctx context.Context, id string) (*model.Resource, errors.ServiceError) GetSchema() *abs.Schema PrepareResourceMigrationPlan(ctx context.Context, resources []*model.Resource, prepareFromDataSource bool) ([]*model.ResourceMigrationPlan, errors.ServiceError) LocateReferences(resource *model.Resource, resolve []string) []string LocateLocalReferences(resource *model.Resource) []string LocateResourceByReference(resource *model.Resource, reference *model.Reference) *model.Resource }
type StatsService ¶ added in v1.1.90
type WatchParams ¶ added in v1.1.37
type WatchParams struct { Selector *model.EventSelector BufferSize int }
type WatchResourceParams ¶ added in v1.2.36
type WatchResourceParams struct { Selector *model.EventSelector BufferSize int }
type WatchService ¶ added in v1.1.37
type WatchService interface { Watch(ctx context.Context, params WatchParams) (<-chan *model.Event, errors.ServiceError) WatchResource(ctx context.Context, params WatchParams) (<-chan *model.Event, errors.ServiceError) }
Click to show internal directories.
Click to hide internal directories.