// NewUserCustomQuotaResult returns a new UserCustomQuotaResult instance
976993
func NewUserCustomQuotaResult(User *UserSelectorArg) *UserCustomQuotaResult {
	s := new(UserCustomQuotaResult)
	s.User = User
	return s
}
402204
func newResourceQuotas(c *CoreClient, namespace string) *resourceQuotas {
	return &resourceQuotas{
		client: c,
		ns:     namespace,
	}
}
1101145
func NewRevokeLinkedAppBatchResult(RevokeLinkedAppStatus []*RevokeLinkedAppStatus) *RevokeLinkedAppBatchResult {
	s := new(RevokeLinkedAppBatchResult)
	s.RevokeLinkedAppStatus = RevokeLinkedAppStatus
	return s
}
1203545
func NewAddTemplateResult(TemplateId string) *AddTemplateResult {
	s := new(AddTemplateResult)
	s.TemplateId = TemplateId
	return s
}
247230
func NewOwnAccountLookupCache(mctx libkb.MetaContext) OwnAccountLookupCache {
	c := &ownAccountLookupCacheImpl{
		accounts: make(map[stellar1.AccountID]*string),
	}
	c.Lock()
	go c.fetch(mctx)
	return c
}
768354
func NewCustom(sampleSize, sampleThreshold int) ImoHash {
	h := ImoHash{
		hasher:          murmur3.New128(),
		sampleSize:      sampleSize,
		sampleThreshold: sampleThreshold,
	}

	return h
}
991925
func NewMockIdentity(err error) (msp.Identity, error) {
	return &MockIdentity{Err: err}, nil
}
730696
func newQuotaAccessor(
	clusterQuotaLister quotalister.ClusterResourceQuotaLister,
	namespaceLister corev1listers.NamespaceLister,
	clusterQuotaClient quotatypedclient.ClusterResourceQuotasGetter,
	clusterQuotaMapper clusterquotamapping.ClusterQuotaMapper,
) *clusterQuotaAccessor {
	updatedCache, err := lru.New(100)
	if err != nil {
		// this should never happen
		panic(err)
	}

	return &clusterQuotaAccessor{
		clusterQuotaLister:   clusterQuotaLister,
		namespaceLister:      namespaceLister,
		clusterQuotaClient:   clusterQuotaClient,
		clusterQuotaMapper:   clusterQuotaMapper,
		updatedClusterQuotas: updatedCache,
	}
}
86327
func (k *SimpleFS) SimpleFSGetUserQuotaUsage(ctx context.Context) (
	res keybase1.SimpleFSQuotaUsage, err error) {
	ctx = k.makeContext(ctx)
	status, _, err := k.config.KBFSOps().Status(ctx)
	if err != nil {
		return keybase1.SimpleFSQuotaUsage{}, err
	}
	res.UsageBytes = status.UsageBytes
	res.ArchiveBytes = status.ArchiveBytes
	res.LimitBytes = status.LimitBytes
	res.GitUsageBytes = status.GitUsageBytes
	res.GitArchiveBytes = status.GitArchiveBytes
	res.GitLimitBytes = status.GitLimitBytes
	return res, nil
}
336623
func newResourceQuotas(c *Client, namespace string) *resourceQuotas {
	return &resourceQuotas{
		r:  c,
		ns: namespace,
	}
}
456746
func newRequestVoteResponse(term uint64, voteGranted bool) *RequestVoteResponse {
	return &RequestVoteResponse{
		Term:        term,
		VoteGranted: voteGranted,
	}
}
1029156
func NewMemberSpaceLimitsRemoveCustomQuotaType(Description string) *MemberSpaceLimitsRemoveCustomQuotaType {
	s := new(MemberSpaceLimitsRemoveCustomQuotaType)
	s.Description = Description
	return s
}
889972
func NewCustomFilter(f func(alert *api.Alert) (bool, error)) Filter {
	return &filter{filterType: CustomFilter, value: f}
}
827138
func newDiskQuotaCacheLocal(
	config diskBlockCacheConfig, dirPath string) (
	cache *DiskQuotaCacheLocal, err error) {
	log := config.MakeLogger("DQC")
	defer func() {
		if err != nil {
			log.Error("Error initializing quota cache: %+v", err)
		}
	}()
	cachePath := filepath.Join(dirPath, quotaCacheFolderName)
	versionPath, err := getVersionedPathForDiskCache(
		log, cachePath, "quota", currentDiskQuotaCacheVersion)
	if err != nil {
		return nil, err
	}
	dbPath := filepath.Join(versionPath, quotaDbFilename)
	quotaStorage, err := storage.OpenFile(dbPath, false)
	if err != nil {
		return nil, err
	}
	defer func() {
		if err != nil {
			quotaStorage.Close()
		}
	}()
	return newDiskQuotaCacheLocalFromStorage(config, quotaStorage)
}
757622
func (m *clusterQuotaMapper) completeQuota(quota *quotav1.ClusterResourceQuota) {
	m.lock.Lock()
	defer m.lock.Unlock()
	m.completedQuotaToSelector[quota.Name] = quota.Spec.Selector
}
1219116
func NewUserPostComment(hcid uint64) (comment *UserPostComment, e error) {
	return NewUserPostCommentWhere(&UserPostComment{Hcid: hcid})
}
249291
func NewGetThumbnailBatchResult(Entries []*GetThumbnailBatchResultEntry) *GetThumbnailBatchResult {
	s := new(GetThumbnailBatchResult)
	s.Entries = Entries
	return s
}