// externalKeyPath returns the relative external derivation path /0/0/index.
359967
func externalKeyPath(index uint32) waddrmgr.DerivationPath {
	return waddrmgr.DerivationPath{
		Account: waddrmgr.DefaultAccountNum,
		Branch:  waddrmgr.ExternalBranch,
		Index:   index,
	}
}
807458
func (s *Key) Path() string {
	return fmt.Sprintf("%s/%s", s.P, s.N)
}
576513
func (m *ExternalCAOption) String() string {
	externalCAs := []string{}
	for _, externalCA := range m.values {
		repr := fmt.Sprintf("%s: %s", externalCA.Protocol, externalCA.URL)
		externalCAs = append(externalCAs, repr)
	}
	return strings.Join(externalCAs, ", ")
}
588989
func (d *manifestDeployer) CharmPath(path string) string {
	return filepath.Join(d.charmPath, path)
}
658711
func GenericPath(mg MinimalGraphics, x, y []int, style Style) {
	n := imin(len(x), len(y))
	for i := 1; i < n; i++ {
		mg.Line(x[i-1], y[i-1], x[i], y[i], style)
	}
}
263161
func (e *Endpoint) DirectoryPath() string {
	return filepath.Join(".", fmt.Sprintf("%d", e.ID))
}
420989
func (s *ActionExecution) SetExternalExecutionUrl(v string) *ActionExecution {
	s.ExternalExecutionUrl = &v
	return s
}
909878
func (t *Tree) HasPath(keys []string) bool {
	return t.GetPath(keys) != nil
}
304036
func (h *Client) DocumentPath(documentPath string) *Client {
	h.documentPath = documentPath
	h.documentPathSet = true
	return h
}
929285
func (c *Client) ExternalControllerInfo(controllerUUID string) (*crossmodel.ControllerInfo, error) {
	if !names.IsValidController(controllerUUID) {
		return nil, errors.NotValidf("controller UUID %q", controllerUUID)
	}
	controllerTag := names.NewControllerTag(controllerUUID)
	args := params.Entities{[]params.Entity{{
		Tag: controllerTag.String(),
	}}}
	var results params.ExternalControllerInfoResults
	err := c.facade.FacadeCall("ExternalControllerInfo", args, &results)
	if err != nil {
		return nil, errors.Trace(err)
	}
	if len(results.Results) != 1 {
		return nil, errors.Errorf("expected 1 result, got %d", len(results.Results))
	}
	result := results.Results[0]
	if result.Error != nil {
		return nil, result.Error
	}
	return &crossmodel.ControllerInfo{
		ControllerTag: controllerTag,
		Alias:         result.Result.Alias,
		Addrs:         result.Result.Addrs,
		CACert:        result.Result.CACert,
	}, nil
}
7753
func execPath() (string, error) {
	file, err := exec.LookPath(os.Args[0])
	if err != nil {
		return "", err
	}
	return filepath.Abs(file)
}
439775
func (ec *Envcfg) CertPath() string {
	path := ec.GetKey(ec.certPathKey)
	if path == "" {
		path = DefaultCertPath
	}

	// ensure the directory exists
	fi, err := os.Stat(path)
	switch {
	case err != nil && os.IsNotExist(err):
		if err := os.MkdirAll(path, 0700); err != nil {
			panic(fmt.Sprintf("cannot create directory: %v", err))
		}
	case err != nil:
		panic(err)
	case !fi.IsDir():
		panic(fmt.Sprintf("%s must be a directory", path))
	}

	return path
}
236463
func Convert_v1beta1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(in *ExternalDocumentation, out *apiextensions.ExternalDocumentation, s conversion.Scope) error {
	return autoConvert_v1beta1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(in, out, s)
}
642355
func GetSandboxForExternalKey(basePath string, key string) (Sandbox, error) {
	if err := createNamespaceFile(key); err != nil {
		return nil, err
	}

	if err := mountNetworkNamespace(basePath, key); err != nil {
		return nil, err
	}
	n := &networkNamespace{path: key, nextIfIndex: make(map[string]int)}

	sboxNs, err := netns.GetFromPath(n.path)
	if err != nil {
		return nil, fmt.Errorf("failed get network namespace %q: %v", n.path, err)
	}
	defer sboxNs.Close()

	n.nlHandle, err = netlink.NewHandleAt(sboxNs, syscall.NETLINK_ROUTE)
	if err != nil {
		return nil, fmt.Errorf("failed to create a netlink handle: %v", err)
	}

	err = n.nlHandle.SetSocketTimeout(ns.NetlinkSocketsTimeout)
	if err != nil {
		logrus.Warnf("Failed to set the timeout on the sandbox netlink handle sockets: %v", err)
	}

	// As starting point, disable IPv6 on all interfaces
	err = setIPv6(n.path, "all", false)
	if err != nil {
		logrus.Warnf("Failed to disable IPv6 on all interfaces on network namespace %q: %v", n.path, err)
	}

	if err = n.loopbackUp(); err != nil {
		n.nlHandle.Delete()
		return nil, err
	}

	return n, nil
}
888790
func ExternalTokenFilterByIdentityID(identityID uuid.UUID) func(db *gorm.DB) *gorm.DB {
	return func(db *gorm.DB) *gorm.DB {
		return db.Where("identity_id = ?", identityID)
	}
}
229199
func (s *WorkflowExecutionSignaledEventAttributes) SetExternalWorkflowExecution(v *WorkflowExecution) *WorkflowExecutionSignaledEventAttributes {
	s.ExternalWorkflowExecution = v
	return s
}
187238
func GetExternalAddress() ExternalAddress {
	ip, err := GetMyIP()
	if err != nil {
		Logln("Can't get my external IP.", err)
		panic(err)
	}
	return ExternalAddress(ip)
}