controller

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

* Copyright 2020 InfAI (CC SES) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

Index

Constants

View Source
const PermV2Topic = "import-types"

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(config config.Config, db database.Database, permV2Client permV2.Client) (ctrl *Controller, err error)

func (*Controller) CheckAccessToImportType

func (this *Controller) CheckAccessToImportType(token jwt.Token, id string, action permV2Model.Permission) (err error, errCode int)

func (*Controller) CreateImportType

func (this *Controller) CreateImportType(importType model.ImportType, token jwt.Token) (result model.ImportType, err error, code int)

func (*Controller) DeleteImportType

func (this *Controller) DeleteImportType(id string, token jwt.Token) (err error, errCode int)

func (*Controller) DeleteUser

func (this *Controller) DeleteUser(userId string) error

func (*Controller) ListImportTypes added in v0.0.5

func (this *Controller) ListImportTypes(token jwt.Token, options model.ImportTypeListOptions) (result []model.ImportType, total int64, err error, errCode int)

func (*Controller) Migrate added in v0.0.7

func (this *Controller) Migrate() error

func (*Controller) ReadImportType

func (this *Controller) ReadImportType(id string, token jwt.Token) (result model.ImportType, err error, errCode int)

func (*Controller) SetImportType

func (this *Controller) SetImportType(importType model.ImportType, token jwt.Token) (err error, errCode int)

func (*Controller) ValidateImportType

func (this *Controller) ValidateImportType(token jwt.Token, importType model.ImportType) (err error, code int)

Jump to

Keyboard shortcuts

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