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: server.go
    path of file: ./repos/aether-app/aether-core/aether/backend/server
    
    the code of the file until where you have to start completion: // Backend > Server
// This file provides the backend the server that the external world accesses to get data from the backend.

package server

import (
	"aether-core/aether/backend/dispatch"
	"aether-core/aether/backend/responsegenerator"
	"aether-core/aether
    
func TruststatesPOST(r *http.Request) ([]byte, error) {
	req, err := ParsePOSTRequest(r)
	if err != nil {
		logging.Log(1, fmt.Sprintf("TruststatesPOST POST request parsing failed. Error: %#v\n, Request Header: %#v\n, Request Body: %#v\n", err, r.Header, req))
		return []byte{}, nil
	}
	err2 := SaveRemote(req)
	if err2 != nil {
		return []byte{}, err2
	}
	respAsByte, err3 := responsegenerator.GeneratePOSTResponse("truststates", req)
	if err3 != nil {
		return respAsByte, err3
	}
	if r != nil {
		r.Body.Close()
	}
	return respAsByte, nil
}