server

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(ctx context.Context) (*echo.Echo, error)

Types

type HttpError

type HttpError struct {
	// エラーが発生した行番号などを持たせておく
	Status int
	Err    error
}

func (*HttpError) Error

func (e *HttpError) Error() string

fmt.Println など、出力するための関数は、内部的に error型だった場合に Error を使う 行番号など、エラーメッセージに付け足すための処理を書いておく

func (*HttpError) Unwrap

func (e *HttpError) Unwrap() error

Unwrap を定義しておけば、errors.Unwrap が使える

type Server

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

func (Server) DeleteAssetAdministrationShellById

func (s Server) DeleteAssetAdministrationShellById(ctx echo.Context, aasId string) error

Deletes a specific Asset Administration Shell at the Asset Administration Shell repository (DELETE /shells/{aasId})

func (Server) GetAllAssetAdministrationShells

func (s Server) GetAllAssetAdministrationShells(ctx echo.Context) error

Retrieves all Asset Administration Shells from the Asset Administration Shell repository (GET /shells)

func (Server) GetAssetAdministrationShellById

func (s Server) GetAssetAdministrationShellById(ctx echo.Context, aasId string) error

Retrieves a specific Asset Administration Shell from the Asset Administration Shell repository (GET /shells/{aasId}/aas)

func (Server) GetShellsAasId

func (s Server) GetShellsAasId(ctx echo.Context, aasId string) error

Retrieves a specific Asset Administration Shell from the Asset Administration Shell repository (GET /shells/{aasId})

func (Server) GetShellsAasIdAasSubmodelsSubmodelIdShort

func (s Server) GetShellsAasIdAasSubmodelsSubmodelIdShort(ctx echo.Context, aasId string, submodelIdShort string) error

Retrieves the Submodel from the Asset Administration Shell (GET /shells/{aasId}/aas/submodels/{submodelIdShort})

func (Server) PutAssetAdministrationShell

func (s Server) PutAssetAdministrationShell(ctx echo.Context, aasId string) error

Creates or updates a Asset Administration Shell at the Asset Administration Shell repository (PUT /shells/{aasId})

func (Server) ShellRepoDeleteSubmodelElementByIdShort

func (s Server) ShellRepoDeleteSubmodelElementByIdShort(ctx echo.Context, aasId string, submodelIdShort string, seIdShortPath string) error

Deletes a specific Submodel-Element from the Submodel (DELETE /shells/{aasId}/aas/submodels/{submodelIdShort}/submodel/submodelElements/{seIdShortPath})

func (Server) ShellRepoDeleteSubmodelFromShellByIdShort

func (s Server) ShellRepoDeleteSubmodelFromShellByIdShort(ctx echo.Context, aasId string, submodelIdShort string) error

Deletes a specific Submodel from the Asset Administration Shell (DELETE /shells/{aasId}/aas/submodels/{submodelIdShort})

func (Server) ShellRepoGetInvocationResultByIdShort

func (s Server) ShellRepoGetInvocationResultByIdShort(ctx echo.Context, aasId string, submodelIdShort string, idShortPathToOperation string, requestId string) error

Retrieves the result of an asynchronously started operation (GET /shells/{aasId}/aas/submodels/{submodelIdShort}/submodel/submodelElements/{idShortPathToOperation}/invocationList/{requestId})

func (Server) ShellRepoGetSubmodelElementByIdShort

func (s Server) ShellRepoGetSubmodelElementByIdShort(ctx echo.Context, aasId string, submodelIdShort string, seIdShortPath string) error

Retrieves a specific Submodel-Element from the Submodel (GET /shells/{aasId}/aas/submodels/{submodelIdShort}/submodel/submodelElements/{seIdShortPath})

func (Server) ShellRepoGetSubmodelElementValueByIdShort

func (s Server) ShellRepoGetSubmodelElementValueByIdShort(ctx echo.Context, aasId string, submodelIdShort string, seIdShortPath string) error

Retrieves the value of a specific Submodel-Element from the Submodel (GET /shells/{aasId}/aas/submodels/{submodelIdShort}/submodel/submodelElements/{seIdShortPath}/value)

func (Server) ShellRepoGetSubmodelElements

func (s Server) ShellRepoGetSubmodelElements(ctx echo.Context, aasId string, submodelIdShort string) error

Retrieves all Submodel-Elements from the Submodel (GET /shells/{aasId}/aas/submodels/{submodelIdShort}/submodel/submodelElements)

func (Server) ShellRepoGetSubmodelFromShellByIdShort

func (s Server) ShellRepoGetSubmodelFromShellByIdShort(ctx echo.Context, aasId string, submodelIdShort string) error

Retrieves the Submodel from the Asset Administration Shell (GET /shells/{aasId}/aas/submodels/{submodelIdShort}/submodel)

func (Server) ShellRepoGetSubmodelValues

func (s Server) ShellRepoGetSubmodelValues(ctx echo.Context, aasId string, submodelIdShort string) error

Retrieves the minimized version of a Submodel, i.e. only the values of SubmodelElements are serialized and returned (GET /shells/{aasId}/aas/submodels/{submodelIdShort}/submodel/values)

func (Server) ShellRepoGetSubmodelsFromShell

func (s Server) ShellRepoGetSubmodelsFromShell(ctx echo.Context, aasId string) error

Retrieves all Submodels from the Asset Administration Shell (GET /shells/{aasId}/aas/submodels)

func (Server) ShellRepoInvokeOperationByIdShort

func (s Server) ShellRepoInvokeOperationByIdShort(ctx echo.Context, aasId string, submodelIdShort string, idShortPathToOperation string, params basyxAas.ShellRepoInvokeOperationByIdShortParams) error

Invokes a specific operation from the Submodel synchronously or asynchronously (POST /shells/{aasId}/aas/submodels/{submodelIdShort}/submodel/submodelElements/{idShortPathToOperation}/invoke)

func (Server) ShellRepoPutSubmodelElement

func (s Server) ShellRepoPutSubmodelElement(ctx echo.Context, aasId string, submodelIdShort string, seIdShortPath string) error

Creates or updates a Submodel-Element at the Submodel (PUT /shells/{aasId}/aas/submodels/{submodelIdShort}/submodel/submodelElements/{seIdShortPath})

func (Server) ShellRepoPutSubmodelElementValueByIdShort

func (s Server) ShellRepoPutSubmodelElementValueByIdShort(ctx echo.Context, aasId string, submodelIdShort string, seIdShortPath string) error

Updates the Submodel-Element's value (PUT /shells/{aasId}/aas/submodels/{submodelIdShort}/submodel/submodelElements/{seIdShortPath}/value)

func (Server) ShellRepoPutSubmodelToShell

func (s Server) ShellRepoPutSubmodelToShell(ctx echo.Context, aasId string, submodelIdShort string) error

Creates or updates a Submodel to an existing Asset Administration Shell (PUT /shells/{aasId}/aas/submodels/{submodelIdShort})

Jump to

Keyboard shortcuts

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