func CreateAction(
	cmd, keyB, id, secretKey string,
	args ...interface{}) *types.Action {

	mac := hmac.New(sha1.New, []byte(secretKey))
	mac.Write([]byte(cmd))
	mac.Write([]byte(keyB))
	mac.Write([]byte(id))
	sum := mac.Sum(nil)
	sumhex := hex.EncodeToString(sum)

	return &types.Action{
		Command:    cmd,
		StorageKey: keyB,
		Args:       args,
		Id:         id,
		Secret:     sumhex,
	}
}
// Given a command and a secret used to generate the hash for a command, does
// all the work of actually creating a Action
Given a command and a secret used to generate the hash for a command, does
all the work of actually creating a Action
// Given a command and a secret used to generate the hash for a command does // all the work of actually creating a Action
func CreateAction(
	cmd, keyB, id, secretKey string,
	args ...interface{}) *types.Action {
	mac := hmac.New(sha1.New, []byte(secretKey))
	mac.Write([]byte(cmd))
	mac.Write([]byte(keyB))
	mac.Write([]byte(id))
	sum := mac.Sum(nil)
	sumhex := hex.EncodeToString(sum)
	return &types.Action{
		Command:    cmd,
		StorageKey: keyB,
		Args:       args,
		Id:         id,
		Secret:     sumhex,
	}
}
func CreateAction ( cmd , keyB , id , secretKey string , args ... interface { } ) * types . Action { mac := hmac . New ( sha1 . New , [ ] byte ( secretKey ) ) mac . Write ( [ ] byte ( cmd ) ) mac . Write ( [ ] byte ( keyB ) ) mac . Write ( [ ] byte ( id ) ) sum := mac . Sum ( nil ) sumhex := hex . EncodeToString ( sum ) return & types . Action { Command : cmd , StorageKey : keyB , Args : args , Id : id , Secret : sumhex , } }
Given a command and a secret used to generate the hash for a command, does
all the work of actually creating a Action
Given a command and a secret used to generate the hash for a command does all the work of actually creating a Action