new api skeleton
This commit is contained in:
parent
80425813c3
commit
329eb1663c
50
pkg/service/script_policy.go
Normal file
50
pkg/service/script_policy.go
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"git.itzana.me/strafesnet/maps-service/pkg/api"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateScriptPolicy implements createScriptPolicy operation.
|
||||||
|
//
|
||||||
|
// Create a new script policy.
|
||||||
|
//
|
||||||
|
// POST /script-policy
|
||||||
|
func (svc *Service) CreateScriptPolicy(ctx context.Context, req api.OptScriptPolicyCreate) (*api.ID, error){
|
||||||
|
return nil,nil
|
||||||
|
}
|
||||||
|
// DeleteScriptPolicy implements deleteScriptPolicy operation.
|
||||||
|
//
|
||||||
|
// Delete the specified script policy by ID.
|
||||||
|
//
|
||||||
|
// DELETE /script-policy/id/{ScriptPolicyID}
|
||||||
|
func (svc *Service) DeleteScriptPolicy(ctx context.Context, params api.DeleteScriptPolicyParams) error{
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
// GetScriptPolicy implements getScriptPolicy operation.
|
||||||
|
//
|
||||||
|
// Get the specified script policy by ID.
|
||||||
|
//
|
||||||
|
// GET /script-policy/id/{ScriptPolicyID}
|
||||||
|
func (svc *Service) GetScriptPolicy(ctx context.Context, params api.GetScriptPolicyParams) (*api.ScriptPolicy, error){
|
||||||
|
return nil,nil
|
||||||
|
}
|
||||||
|
// GetScriptPolicyFromHash implements getScriptPolicyFromHash operation.
|
||||||
|
//
|
||||||
|
// Get the policy for the given hash of script source code.
|
||||||
|
//
|
||||||
|
// GET /script-policy/hash/{FromScriptHash}
|
||||||
|
func (svc *Service) GetScriptPolicyFromHash(ctx context.Context, params api.GetScriptPolicyFromHashParams) (*api.ScriptPolicy, error){
|
||||||
|
return nil,nil
|
||||||
|
}
|
||||||
|
// UpdateScriptPolicy implements updateScriptPolicy operation.
|
||||||
|
//
|
||||||
|
// Update the specified script policy by ID.
|
||||||
|
//
|
||||||
|
// PATCH /script-policy/id/{ScriptPolicyID}
|
||||||
|
func (svc *Service) UpdateScriptPolicy(ctx context.Context, req api.OptScriptPolicyUpdate, params api.UpdateScriptPolicyParams) error{
|
||||||
|
return nil
|
||||||
|
}
|
42
pkg/service/scripts.go
Normal file
42
pkg/service/scripts.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"git.itzana.me/strafesnet/maps-service/pkg/api"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateScript implements createScript operation.
|
||||||
|
//
|
||||||
|
// Create a new script.
|
||||||
|
//
|
||||||
|
// POST /scripts
|
||||||
|
func (svc *Service) CreateScript(ctx context.Context, req api.OptScriptCreate) (*api.ID, error){
|
||||||
|
return nil,nil
|
||||||
|
}
|
||||||
|
// DeleteScript implements deleteScript operation.
|
||||||
|
//
|
||||||
|
// Delete the specified script by ID.
|
||||||
|
//
|
||||||
|
// DELETE /scripts/{ScriptID}
|
||||||
|
func (svc *Service) DeleteScript(ctx context.Context, params api.DeleteScriptParams) error{
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
// GetScript implements getScript operation.
|
||||||
|
//
|
||||||
|
// Get the specified script by ID.
|
||||||
|
//
|
||||||
|
// GET /scripts/{ScriptID}
|
||||||
|
func (svc *Service) GetScript(ctx context.Context, params api.GetScriptParams) (*api.Script, error){
|
||||||
|
return nil,nil
|
||||||
|
}
|
||||||
|
// UpdateScript implements updateScript operation.
|
||||||
|
//
|
||||||
|
// Update the specified script by ID.
|
||||||
|
//
|
||||||
|
// PATCH /scripts/{ScriptID}
|
||||||
|
func (svc *Service) UpdateScript(ctx context.Context, req api.OptScriptUpdate, params api.UpdateScriptParams) error{
|
||||||
|
return nil
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user