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: gitee.go
    path of file: ./repos/BookStack/oauth
    
    the code of the file until where you have to start completion: package oauth

import (
	"crypto/tls"
	"strings"

	"encoding/json"

	"time"

	"github.com/astaxie/beego"
	"github.com/astaxie/beego/httplib"
)

//gitee accesstoken 数据
type GiteeAccessToken struct {
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	Scope        string `json:"scope"`
	CreatedAt    int    `json:"created_at"`
}

//gitee 用户数据
//用户使用g
    
func GetGiteeAccessToken(code string) (token GiteeAccessToken, err error) {
	var resp string
	Api := beego.AppConfig.String("oauth::giteeAccesstoken")
	ClientId := beego.AppConfig.String("oauth::giteeClientId")
	ClientSecret := beego.AppConfig.String("oauth::giteeClientSecret")
	Callback := beego.AppConfig.String("oauth::giteeCallback")
	req := httplib.Post(Api)
	if strings.HasPrefix(Api, "https") {
		req.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
	}
	req.Param("grant_type", "authorization_code")
	req.Param("code", code)
	req.Param("client_id", ClientId)
	req.Param("redirect_uri", Callback)
	req.Param("client_secret", ClientSecret)
	if resp, err = req.String(); err == nil {
		err = json.Unmarshal([]byte(resp), &token)
	}
	return
}