func (c *BuildloggerConfig) SetCredentials(username, password string) {
	c.username = username
	c.password = password
}
SetCredentials configures the username and password of the
BuildLoggerConfig object. Use to programatically update the
credentials in a configuration object instead of reading from the
credentials file with ReadCredentialsFromFile(),
package send
import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"os"
	"strconv"
	"strings"
	"time"
	"github.com/mongodb/grip/level"
	"github.com/mongodb/grip/message"
)
type buildlogger struct {
	conf   *BuildloggerConfig
	name   string
	cache  chan []interface{}
	client *http.Client
	*Base
}
type BuildloggerConfig struct {
	CreateTest bool   `json:"create_test" bson:"create_test"`
	URL        string `json:"url" bson:"url"`
	Number  int    `json:"number" bson:"number"`
	Phase   string `json:"phase" bson:"phase"`
	Builder string `json:"builder" bson:"builder"`
	Test    string `json:"test" bson:"test"`
	Command string `json:"command" bson:"command"`
	Local Sender `json:"-" bson:"-"`
	buildID  string
	testID   string
	username string
	password string
}
func (c *BuildloggerConfig) ReadCredentialsFromFile(fn string) error {
	if _, err := os.Stat(fn); os.IsNotExist(err) {
		return errors.New("credentials file does not exist")
	}
	contents, err := ioutil.ReadFile(fn)
	if err != nil {
		return err
	}
	out := struct {
		Username string `json:"username"`
		Password string `json:"password"`
	}{}
	if err := json.Unmarshal(contents, &out); err != nil {
		return err
	}
	c.username = out.Username
	c.password = out.Password
	return nil
}