// PostingsRanges returns a new map of byte range in the underlying index file
// for all postings lists.
353416
func (r *Reader) PostingsRanges() (map[labels.Label]Range, error) {
	m := map[labels.Label]Range{}

	for k, e := range r.postings {
		for v, start := range e {
			d := encoding.NewDecbufAt(r.b, int(start), castagnoliTable)
			if d.Err() != nil {
				return nil, d.Err()
			}
			m[labels.Label{Name: k, Value: v}] = Range{
				Start: int64(start) + 4,
				End:   int64(start) + 4 + int64(d.Len()),
			}
		}
	}
	return m, nil
}
554354
func (h *headIndexReader) Postings(name, value string) (index.Postings, error) {
	return h.head.postings.Get(name, value), nil
}
332189
func (l *Forwarder) PostSessionSlice(slice SessionSlice) error {
	// setup slice sets slice version, properly numerates
	// all chunks and
	chunksWithoutPrintEvents, err := l.setupSlice(&slice)
	if err != nil {
		return trace.Wrap(err)
	}

	// log all events and session recording locally
	err = l.sessionLogger.PostSessionSlice(slice)
	if err != nil {
		return trace.Wrap(err)
	}
	// no chunks to post (all chunks are print events)
	if len(chunksWithoutPrintEvents) == 0 {
		return nil
	}
	slice.Chunks = chunksWithoutPrintEvents
	slice.Version = V3
	err = l.ForwardTo.PostSessionSlice(slice)
	return err
}
231767
func (prj *Project) Postlist(options PostlistOptions) *[]ExistingPost {
	var posts []ProjectPost
	var projectPost ProjectPost
	projectPosts := projectPost.TableName()
	users := new(User).TableName()

	query := Db().Model(projectPost).Order("hpid DESC").
		Joins("JOIN "+users+" ON "+users+".counter = "+projectPosts+".to"). //PostListOptions.Language support
		Where(`"to" = ?`, prj.ID())

	options.Model = projectPost
	query = postlistQueryBuilder(query, options)
	query.Scan(&posts)

	var retPosts []ExistingPost
	for _, p := range posts {
		projectPost := p
		retPosts = append(retPosts, ExistingPost(&projectPost))
	}

	return &retPosts
}
591122
func NewUserPost(hpid uint64) (*UserPost, error) {
	return NewUserPostWhere(&UserPost{Post{Hpid: hpid}})
}
6582
func (post *UserPost) Bookmarks() *[]Bookmark {
	ret := []UserPostBookmark{}
	Db().Model(UserPostBookmark{}).Where(&UserPostBookmark{Hpid: post.ID()}).Scan(&ret)
	var retBookmarks []Bookmark
	for _, b := range ret {
		bookmark := b
		retBookmarks = append(retBookmarks, Bookmark(&bookmark))
	}

	return &retBookmarks
}
977084
func (srv *Server) Post(path string, body []byte) *Request {
	return srv.NewRequest(http.MethodPost, path).Body(body)
}
172993
func QbsWrapPost(poster QbsRestPost, s *QbsStore) RestPost {
	return &qbsWrapped{post: poster, store: s}
}
1371684
func NewUnorderedMemPostings() *MemPostings {
	return &MemPostings{
		m:       make(map[string]map[string][]uint64, 512),
		ordered: false,
	}
}
886579
func (c *CredentialGraphClient) Post(ctx context.Context, t *CredentialGraph) (CredentialGraph, error) {
	resp := rawGraph{}
	err := c.client.RoundTrip(ctx, "POST", "/credentialgraph", nil, t, &resp)
	if err != nil {
		return nil, err
	}

	return resp.convert()
}
1099360
func (r Request) PostFormFileDisk(params map[string]string, paramName string, filePath string) (Request, error) {
	return reqFormFileDisk(r, params, paramName, filePath, "POST")
}
743154
func NewMemPostings() *MemPostings {
	return &MemPostings{
		m:       make(map[string]map[string][]uint64, 512),
		ordered: true,
	}
}
344307
func makePostsFromMinis(minis []MiniPost, client ClientInterface) []PostInterface {
	posts := []PostInterface{}
	for _, mini := range minis {
		post, _ := makePostFromType(mini.Type)
		post.GetSelf().client = client
		posts = append(posts, post)
	}
	return posts
}
733787
func AvailablePostingsFormats() []string {
	ans := make([]string, 0, len(allPostingsFormats))
	for name, _ := range allPostingsFormats {
		ans = append(ans, name)
	}
	return ans
}
1250152
func (pb *Bar) Postfix(postfix string) *Bar {
	pb.mu.Lock()
	defer pb.mu.Unlock()

	pb.postfix = postfix
	return pb
}
142148
func (a *Client) PostPollers(params *PostPollersParams, authInfo runtime.ClientAuthInfoWriter) (*PostPollersOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPostPollersParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "PostPollers",
		Method:             "POST",
		PathPattern:        "/pollers",
		ProducesMediaTypes: []string{"application/json", "application/x-gzip"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http", "https"},
		Params:             params,
		Reader:             &PostPollersReader{formats: a.formats},
		AuthInfo:           authInfo,
	})
	if err != nil {
		return nil, err
	}
	return result.(*PostPollersOK), nil
}
407885
func (h *TermsHashPerFieldImpl) sortPostings(termComp func(a, b []byte) bool) []int {
	return h.bytesHash.Sort(termComp)
}