// GetCommitContent gets the content of a file from a certain commit.
// The content is returned as base64 encoded string.
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html##get-content-from-commit
559923
func (s *ProjectsService) GetCommitContent(projectName, commitID, fileID string) (string, *Response, error) {
	u := fmt.Sprintf("projects/%s/commits/%s/files/%s/content", url.QueryEscape(projectName), commitID, fileID)
	return getStringResponseWithoutOptions(s.client, u)
}
1217722
func (g *GistFile) GetContent() string {
	if g == nil || g.Content == nil {
		return ""
	}
	return *g.Content
}
766637
func (j *JWS) SignContent(url string, content []byte) (*jose.JSONWebSignature, error) {
	var alg jose.SignatureAlgorithm
	switch k := j.privKey.(type) {
	case *rsa.PrivateKey:
		alg = jose.RS256
	case *ecdsa.PrivateKey:
		if k.Curve == elliptic.P256() {
			alg = jose.ES256
		} else if k.Curve == elliptic.P384() {
			alg = jose.ES384
		}
	}

	signKey := jose.SigningKey{
		Algorithm: alg,
		Key:       jose.JSONWebKey{Key: j.privKey, KeyID: j.kid},
	}

	options := jose.SignerOptions{
		NonceSource: j.nonces,
		ExtraHeaders: map[jose.HeaderKey]interface{}{
			"url": url,
		},
	}

	if j.kid == "" {
		options.EmbedJWK = true
	}

	signer, err := jose.NewSigner(signKey, &options)
	if err != nil {
		return nil, fmt.Errorf("failed to create jose signer -> %v", err)
	}

	signed, err := signer.Sign(content)
	if err != nil {
		return nil, fmt.Errorf("failed to sign content -> %v", err)
	}
	return signed, nil
}
63359
func (d *driver) GetContent(ctx context.Context, path string) ([]byte, error) {
	rc, err := d.Reader(ctx, path, 0)
	if err != nil {
		return nil, err
	}
	defer rc.Close()

	p, err := ioutil.ReadAll(rc)
	if err != nil {
		return nil, err
	}

	return p, nil
}
913412
func (k *DeployKey) GetContent() error {
	pkey, err := GetPublicKeyByID(k.KeyID)
	if err != nil {
		return err
	}
	k.Content = pkey.Content
	return nil
}
219277
func (d *driver) GetContent(ctx context.Context, path string) ([]byte, error) {
	reader, err := d.Reader(ctx, path, 0)
	if err != nil {
		return nil, err
	}
	return ioutil.ReadAll(reader)
}
1216378
func (f *File) ReadContent() error {
	if len(f.Content) == 0 {
		content, err := ioutil.ReadFile(path.Join(f.Path, f.FileName))
		if err != nil {
			return err
		}
		f.Content = content
	}
	return nil
}
1246307
func (r *Reaction) GetContent() string {
	if r == nil || r.Content == nil {
		return ""
	}
	return *r.Content
}
832979
func (i *InstallationPermissions) GetContents() string {
	if i == nil || i.Contents == nil {
		return ""
	}
	return *i.Contents
}
612794
func (obj *Variable) GetContentRaw(ctx context.Context) (json.RawMessage, error) {
	result := &struct {
		Content json.RawMessage	`json:"qContent"`
	} {}
	err := obj.rpc(ctx, "GetContent", result)
	return result.Content, err 
}
434963
func (d *driver) GetContent(context context.Context, path string) ([]byte, error) {
	gcsContext := d.context(context)
	name := d.pathToKey(path)
	var rc io.ReadCloser
	err := retry(func() error {
		var err error
		rc, err = storage.NewReader(gcsContext, d.bucket, name)
		return err
	})
	if err == storage.ErrObjectNotExist {
		return nil, storagedriver.PathNotFoundError{Path: path}
	}
	if err != nil {
		return nil, err
	}
	defer rc.Close()

	p, err := ioutil.ReadAll(rc)
	if err != nil {
		return nil, err
	}
	return p, nil
}
1063070
func (r *ReleaseAsset) GetContentType() string {
	if r == nil || r.ContentType == nil {
		return ""
	}
	return *r.ContentType
}
775961
func (client *Client) GetMessageContent(messageID string) *GetMessageContentCall {
	return &GetMessageContentCall{
		c:         client,
		messageID: messageID,
	}
}
1021132
func (d *driver) GetContent(ctx context.Context, path string) ([]byte, error) {
	content, err := d.Bucket.Get(d.ossPath(path))
	if err != nil {
		return nil, parseError(path, err)
	}
	return content, nil
}
921794
func (p *PagesBuild) GetCommit() string {
	if p == nil || p.Commit == nil {
		return ""
	}
	return *p.Commit
}
572558
func (i *IssueEvent) GetCommitID() string {
	if i == nil || i.CommitID == nil {
		return ""
	}
	return *i.CommitID
}
764378
func (d *GetResult) Content(valuePtr interface{}) error {
	return DefaultDecode(d.contents, d.flags, valuePtr)
}