package logic

import (
	"context"

        yaml "sigs.k8s.io/yaml"
)

type CreateUserRequest struct {
        Username string `json:"username" form:"username"`
        Grants []string `json:"grants"   form:"grants"`
}
type CreateUserResult struct {
        Username string `json:"username" form:"username"`
        Grants []string `json:"grants"   form:"grants"`
}

func (lg *Logic) CreateUser(ctx context.Context, params *CreateUserRequest) (*CreateUserResult, error) {
	var err error
	res := &CreateUserResult{
                Username: params.Username,
                Grants: params.Grants,
        }
        reqYaml, err := yaml.Marshal(params)
        if err != nil {
                return res, err
        }
        lg.log.Debugf("Create user request: \n%s\n", string(reqYaml))
	return res, err
}

type DeleteUserRequest struct {
        Username string `json:"username" form:"username"`
}
type DeleteUserResult struct {}

func (lg *Logic) DeleteUser(ctx context.Context, params *DeleteUserRequest) (*DeleteUserResult, error) {
	var err error
	res := &DeleteUserResult{}
	return res, err
}

