当前位置: 首页>>代码示例>>Golang>>正文


Golang libkb.NewContextified函数代码示例

本文整理汇总了Golang中github.com/keybase/client/go/libkb.NewContextified函数的典型用法代码示例。如果您正苦于以下问题:Golang NewContextified函数的具体用法?Golang NewContextified怎么用?Golang NewContextified使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了NewContextified函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: NewCmdPGPVerify

func NewCmdPGPVerify(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command {
	return cli.Command{
		Name:  "verify",
		Usage: "PGP verify message or file signatures for keybase users",
		Action: func(c *cli.Context) {
			cl.ChooseCommand(&CmdPGPVerify{Contextified: libkb.NewContextified(g)}, "verify", c)
		},
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "l, local",
				Usage: "Only track locally, don't send a statement to the server.",
			},
			cli.BoolFlag{
				Name:  "y",
				Usage: "Approve remote tracking without prompting.",
			},
			cli.StringFlag{
				Name:  "m, message",
				Usage: "Provide the message on the command line.",
			},
			cli.StringFlag{
				Name:  "i, infile",
				Usage: "Specify an input file.",
			},
			cli.StringFlag{
				Name:  "d, detached",
				Usage: "Specify a detached signature file.",
			},
			cli.StringFlag{
				Name:  "S, signed-by",
				Usage: "Assert signed by the given user (can use user assertion format).",
			},
		},
	}
}
开发者ID:polluks,项目名称:client,代码行数:35,代码来源:cmd_pgp_verify.go

示例2: NewConfigHandler

func NewConfigHandler(xp rpc.Transporter, g *libkb.GlobalContext, svc *Service) *ConfigHandler {
	return &ConfigHandler{
		Contextified: libkb.NewContextified(g),
		xp:           xp,
		svc:          svc,
	}
}
开发者ID:polluks,项目名称:client,代码行数:7,代码来源:config.go

示例3: NewCmdSign

func NewCmdSign(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command {
	return cli.Command{
		Name:  "sign",
		Usage: "Sign a document",
		Action: func(c *cli.Context) {
			cl.ChooseCommand(&CmdSign{Contextified: libkb.NewContextified(g)}, "sign", c)
		},
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "b, binary",
				Usage: "Output binary message (default is armored).",
			},
			cli.BoolFlag{
				Name:  "d, detached",
				Usage: "Detached signature (default is attached).",
			},
			cli.StringFlag{
				Name:  "i, infile",
				Usage: "Specify an input file.",
			},
			cli.StringFlag{
				Name:  "m, message",
				Usage: "Provide the message to sign on the command line.",
			},
			cli.StringFlag{
				Name:  "o, outfile",
				Usage: "Specify an outfile (default is STDOUT).",
			},
		},
	}
}
开发者ID:mark-adams,项目名称:client,代码行数:31,代码来源:cmd_sign.go

示例4: NewLogHandler

// NewLogHandler creates a LogHandler for the xp transport.
func NewLogHandler(xp rpc.Transporter, logReg *logRegister, g *libkb.GlobalContext) *LogHandler {
	return &LogHandler{
		BaseHandler:  NewBaseHandler(xp),
		logReg:       logReg,
		Contextified: libkb.NewContextified(g),
	}
}
开发者ID:mattcurrycom,项目名称:client,代码行数:8,代码来源:log.go

示例5: NewRevokeKeyEngine

func NewRevokeKeyEngine(kid keybase1.KID, g *libkb.GlobalContext) *RevokeEngine {
	return &RevokeEngine{
		kid:          kid,
		mode:         RevokeKey,
		Contextified: libkb.NewContextified(g),
	}
}
开发者ID:qbit,项目名称:client,代码行数:7,代码来源:revoke.go

示例6: NewSecretEntry

func NewSecretEntry(g *libkb.GlobalContext, t *Terminal, tty string) *SecretEntry {
	return &SecretEntry{
		Contextified: libkb.NewContextified(g),
		terminal:     t,
		tty:          tty,
	}
}
开发者ID:mark-adams,项目名称:client,代码行数:7,代码来源:secret_entry.go

示例7: NewXLogin

// NewXLogin creates a XLogin engine.  username is optional.
// deviceType should be libkb.DeviceTypeDesktop or
// libkb.DeviceTypeMobile.
func NewXLogin(g *libkb.GlobalContext, deviceType, username string) *XLogin {
	return &XLogin{
		Contextified: libkb.NewContextified(g),
		deviceType:   deviceType,
		username:     username,
	}
}
开发者ID:alex,项目名称:client-beta,代码行数:10,代码来源:xlogin.go

示例8: NewLocksmith

func NewLocksmith(arg *LocksmithArg, g *libkb.GlobalContext) *Locksmith {
	return &Locksmith{
		Contextified: libkb.NewContextified(g),
		arg:          arg,
		canceled:     make(chan struct{}),
	}
}
开发者ID:paul-pearce,项目名称:client-beta,代码行数:7,代码来源:locksmith.go

示例9: NewPGPKeyExportByKIDEngine

func NewPGPKeyExportByKIDEngine(arg keybase1.PGPExportByKIDArg, g *libkb.GlobalContext) *PGPKeyExportEngine {
	return &PGPKeyExportEngine{
		arg:          arg.Options,
		qtype:        kid,
		Contextified: libkb.NewContextified(g),
	}
}
开发者ID:mark-adams,项目名称:client,代码行数:7,代码来源:pgp_export_key.go

示例10: NewBTCEngine

func NewBTCEngine(address string, force bool, g *libkb.GlobalContext) *BTCEngine {
	return &BTCEngine{
		address:      address,
		force:        force,
		Contextified: libkb.NewContextified(g),
	}
}
开发者ID:mark-adams,项目名称:client,代码行数:7,代码来源:btc.go

示例11: NewResolveThenIdentify2WithTrack

func NewResolveThenIdentify2WithTrack(g *libkb.GlobalContext, arg *keybase1.Identify2Arg, topts keybase1.TrackOptions) *ResolveThenIdentify2 {
	return &ResolveThenIdentify2{
		Contextified: libkb.NewContextified(g),
		arg:          arg,
		trackOptions: topts,
	}
}
开发者ID:qbit,项目名称:client,代码行数:7,代码来源:resolve_identify2.go

示例12: ParseArgv

func (c *CmdDecrypt) ParseArgv(ctx *cli.Context) error {
	if len(ctx.Args()) > 0 {
		return UnexpectedArgsError("decrypt")
	}
	interactive := ctx.Bool("interactive")
	c.spui = &SaltpackUI{
		Contextified: libkb.NewContextified(c.G()),
		interactive:  interactive,
		force:        ctx.Bool("force"),
	}
	c.opts.Interactive = interactive
	c.opts.UsePaperKey = ctx.Bool("paperkey")
	msg := ctx.String("message")
	outfile := ctx.String("outfile")
	infile := ctx.String("infile")
	senderfile := ctx.String("encryptor-outfile")
	if err := c.filter.FilterInit(msg, infile, outfile); err != nil {
		return err
	}
	if senderfile != "" {
		c.senderfile = NewFileSink(senderfile)
	}

	return nil
}
开发者ID:qbit,项目名称:client,代码行数:25,代码来源:cmd_decrypt.go

示例13: NewCmdTestFSNotify

func NewCmdTestFSNotify(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command {
	return cli.Command{
		Name:  "test-fsnotify",
		Usage: "Test kbfs notifications",
		Action: func(c *cli.Context) {
			cl.ChooseCommand(&CmdTestFSNotify{Contextified: libkb.NewContextified(g)}, "test-fsnotify", c)
		},
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "p, public",
				Usage: "public top level folder",
			},
			cli.StringFlag{
				Name:  "f, filename",
				Usage: "filename",
			},
			cli.StringFlag{
				Name:  "a, action",
				Usage: "[encrypting|decrypting|signing|verifying|rekeying]",
			},
			cli.StringFlag{
				Name:  "delay",
				Usage: "delay between start and finish calls",
			},
		},
	}
}
开发者ID:mark-adams,项目名称:client,代码行数:27,代码来源:cmd_test_fsnotify.go

示例14: NewCmdVersionRunner

func NewCmdVersionRunner(g *libkb.GlobalContext) *CmdVersion {
	return &CmdVersion{
		mode:         modeNormal,
		svc:          true,
		Contextified: libkb.NewContextified(g),
	}
}
开发者ID:mark-adams,项目名称:client,代码行数:7,代码来源:cmd_version.go

示例15: NewIdentifyUIHandler

func NewIdentifyUIHandler(g *libkb.GlobalContext, connID libkb.ConnectionID) IdentifyUIHandler {
	return IdentifyUIHandler{
		Contextified: libkb.NewContextified(g),
		connID:       connID,
		alwaysAlive:  false,
	}
}
开发者ID:qbit,项目名称:client,代码行数:7,代码来源:gregor.go


注:本文中的github.com/keybase/client/go/libkb.NewContextified函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。