You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: types.go
    path of file: ./repos/cds/engine/service
    
    the code of the file until where you have to start completion: package service

import (
	"context"
	"crypto/rsa"
	"fmt"
	"time"

	"github.com/sirupsen/logrus"
	"gopkg.in/square/go-jose.v2"

	"github.com/ovh/cds/sdk"
	"github.com/ovh/cds/sdk/cdsclient"
)

// APIServiceConfiguration is an exposed type for CDS API
type APIServiceConfiguration struct {
	HTTP struct {
		URL      string `toml:"url" default:"http://localhost:8081" json:"url"`
		Insecure bool   `toml:"insecure" commented:"true" json:"insecure"`
	} `toml:"http" json:"http"`
	Token                string `toml:"token" default:"************" json:"-"`
	RequestTimeout       int    `toml:"requestTimeout" default:"10" json:"requestTimeout"`
	MaxHeartbeatFailures int    `toml:"maxHeartbeatFailures" default:"10" jso
    
func (hcc HatcheryCommonConfiguration) Check() error {
	if hcc.Provision.MaxConcurrentProvisioning > hcc.Provision.MaxWorker {
		return fmt.Errorf("maxConcurrentProvisioning (value: %d) cannot be less than maxWorker (value: %d) ",
			hcc.Provision.MaxConcurrentProvisioning, hcc.Provision.MaxWorker)
	}

	if hcc.Provision.MaxConcurrentRegistering > hcc.Provision.MaxWorker {
		return fmt.Errorf("maxConcurrentRegistering (value: %d) cannot be less than maxWorker (value: %d) ",
			hcc.Provision.MaxConcurrentRegistering, hcc.Provision.MaxWorker)
	}

	if hcc.API.HTTP.URL == "" {
		return fmt.Errorf("API HTTP(s) URL is mandatory")
	}

	if hcc.API.Token == "" {
		return fmt.Errorf("API Token URL is mandatory")
	}

	if hcc.Name == "" {
		return fmt.Errorf("please enter a name in your hatchery configuration")
	}

	return nil
}