// TrustedPush handles content trust pushing of an image
330075
func TrustedPush(ctx context.Context, cli command.Cli, repoInfo *registry.RepositoryInfo, ref reference.Named, authConfig types.AuthConfig, requestPrivilege types.RequestPrivilegeFunc) error {
	responseBody, err := imagePushPrivileged(ctx, cli, authConfig, ref, requestPrivilege)
	if err != nil {
		return err
	}

	defer responseBody.Close()

	return PushTrustedReference(cli, repoInfo, ref, authConfig, responseBody)
}
968580
func WithContentTrust(enabled bool) DockerCliOption {
	return func(cli *DockerCli) error {
		cli.contentTrust = enabled
		return nil
	}
}
235390
func (p *Prometheus) SetPushGateway(pushGatewayURL, metricsURL string, pushIntervalSeconds time.Duration) {
	p.Ppg.PushGatewayURL = pushGatewayURL
	p.Ppg.MetricsURL = metricsURL
	p.Ppg.PushIntervalSeconds = pushIntervalSeconds
	p.startPushTicker()
}
483656
func (srv *Server) AddTrustedPeer(node *enode.Node) {
	select {
	case srv.addtrusted <- node:
	case <-srv.quit:
	}
}
1247717
func newPush(url *string, timeout time.Duration) (p push, err error) {
	err = p.connect(url)
	p.SetTimeout(timeout)
	return
}
981416
func (s *SetIdentityPoolConfigurationOutput) SetPushSync(v *PushSync) *SetIdentityPoolConfigurationOutput {
	s.PushSync = v
	return s
}
1184812
func (s *DomainsService) AcceptPush(accountID string, pushID int64, pushAttributes DomainPushAttributes) (*domainPushResponse, error) {
	path := versioned(domainPushPath(accountID, pushID))
	pushResponse := &domainPushResponse{}

	resp, err := s.client.post(path, pushAttributes, nil)
	if err != nil {
		return nil, err
	}

	pushResponse.HttpResponse = resp
	return pushResponse, nil
}
270812
func (s *PresenceService) UpsertTrustedCluster(trustedCluster services.TrustedCluster) (services.TrustedCluster, error) {
	if err := trustedCluster.CheckAndSetDefaults(); err != nil {
		return nil, trace.Wrap(err)
	}
	value, err := services.GetTrustedClusterMarshaler().Marshal(trustedCluster)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	_, err = s.Put(context.TODO(), backend.Item{
		Key:     backend.Key(trustedClustersPrefix, trustedCluster.GetName()),
		Value:   value,
		Expires: trustedCluster.Expiry(),
		ID:      trustedCluster.GetResourceID(),
	})
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return trustedCluster, nil
}
373541
func (i *Client) Push(c context.Context, state *PushState, source Source) (err error) {
	// This push operation may be a retry after failed finalization call below,
	// no need to reupload contents in that case.
	if !state.uploaded {
		// PUT file to uploadURL.
		if err = i.doPush(c, state, source); err != nil {
			log.Printf("doPush(%s) failed: %s\n%#v", state.digest, err, state)
			return
		}
		state.uploaded = true
	}

	// Optionally notify the server that it's done.
	if state.status.GsUploadUrl != "" {
		end := tracer.Span(i, "finalize", nil)
		defer func() { end(tracer.Args{"err": err}) }()
		// TODO(vadimsh): Calculate MD5 or CRC32C sum while uploading a file and
		// send it to isolated server. That way isolate server can verify that
		// the data safely reached Google Storage (GS provides MD5 and CRC32C of
		// stored files).
		in := isolateservice.HandlersEndpointsV1FinalizeRequest{UploadTicket: state.status.UploadTicket}
		headers := map[string]string{"Cache-Control": "public, max-age=31536000"}
		if err = i.postJSON(c, "/_ah/api/isolateservice/v1/finalize_gs_upload", headers, in, nil); err != nil {
			log.Printf("Push(%s) (finalize) failed: %s\n%#v", state.digest, err, state)
			return
		}
	}
	state.finalized = true
	return
}
1285044
func (r *Repository) GetPushedAt() Timestamp {
	if r == nil || r.PushedAt == nil {
		return Timestamp{}
	}
	return *r.PushedAt
}
1020633
func (rb *route) PushMisc(sel *sqlparser.Select) {
	rb.Select.(*sqlparser.Select).Comments = sel.Comments
	rb.Select.(*sqlparser.Select).Lock = sel.Lock
}
176673
func (pb *Pushbullet) PostPushesFile(f *requests.File) (*responses.File, error) {
	res, err := pb.postPushes(f)
	if err != nil {
		return nil, err
	}

	var fileRes *responses.File
	decoder := json.NewDecoder(res.Body)
	if err := decoder.Decode(&fileRes); err != nil {
		return nil, err
	}

	return fileRes, err
}
1134437
func (r *runner) stackPush(I1 int) {
	r.runstackpos--
	r.runstack[r.runstackpos] = I1
}
760981
func (s *DefaultPushNotificationMessage) SetSilentPush(v bool) *DefaultPushNotificationMessage {
	s.SilentPush = &v
	return s
}
811222
func (pb *Pushbullet) PostPushesChecklist(c *requests.Checklist) (*responses.Checklist, error) {
	res, err := pb.postPushes(c)
	if err != nil {
		return nil, err
	}

	var checkRes *responses.Checklist
	decoder := json.NewDecoder(res.Body)
	if err := decoder.Decode(&checkRes); err != nil {
		return nil, err
	}

	return checkRes, err
}
51175
func (m *MockRPCClient) SendPush(userID string, frontendSv *cluster.Server, push *protos.Push) error {
	ret := m.ctrl.Call(m, "SendPush", userID, frontendSv, push)
	ret0, _ := ret[0].(error)
	return ret0
}
956132
func (s *GCMMessage) SetSilentPush(v bool) *GCMMessage {
	s.SilentPush = &v
	return s
}