password

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_password_proto protoreflect.FileDescriptor

Functions

func NewPasswordEndpoints

func NewPasswordEndpoints() []*api.Endpoint

func RegisterPasswordHandler

func RegisterPasswordHandler(s server.Server, hdlr PasswordHandler, opts ...server.HandlerOption) error

Types

type GenerateRequest

type GenerateRequest struct {

	// password length; defaults to 8 chars
	Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
	// include lowercase letters
	Lowercase bool `protobuf:"varint,2,opt,name=lowercase,proto3" json:"lowercase,omitempty"`
	// include uppercase letters
	Uppercase bool `protobuf:"varint,3,opt,name=uppercase,proto3" json:"uppercase,omitempty"`
	// include numbers
	Numbers bool `protobuf:"varint,4,opt,name=numbers,proto3" json:"numbers,omitempty"`
	// include special characters (!@#$%&*)
	Special bool `protobuf:"varint,5,opt,name=special,proto3" json:"special,omitempty"`
	// contains filtered or unexported fields
}

Generate a strong random password. Use the switches to control which character types are included, defaults to using all of them

func (*GenerateRequest) Descriptor deprecated

func (*GenerateRequest) Descriptor() ([]byte, []int)

Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead.

func (*GenerateRequest) GetLength

func (x *GenerateRequest) GetLength() int32

func (*GenerateRequest) GetLowercase

func (x *GenerateRequest) GetLowercase() bool

func (*GenerateRequest) GetNumbers

func (x *GenerateRequest) GetNumbers() bool

func (*GenerateRequest) GetSpecial

func (x *GenerateRequest) GetSpecial() bool

func (*GenerateRequest) GetUppercase

func (x *GenerateRequest) GetUppercase() bool

func (*GenerateRequest) ProtoMessage

func (*GenerateRequest) ProtoMessage()

func (*GenerateRequest) ProtoReflect

func (x *GenerateRequest) ProtoReflect() protoreflect.Message

func (*GenerateRequest) Reset

func (x *GenerateRequest) Reset()

func (*GenerateRequest) String

func (x *GenerateRequest) String() string

type GenerateResponse

type GenerateResponse struct {

	// The generated password
	Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*GenerateResponse) Descriptor deprecated

func (*GenerateResponse) Descriptor() ([]byte, []int)

Deprecated: Use GenerateResponse.ProtoReflect.Descriptor instead.

func (*GenerateResponse) GetPassword

func (x *GenerateResponse) GetPassword() string

func (*GenerateResponse) ProtoMessage

func (*GenerateResponse) ProtoMessage()

func (*GenerateResponse) ProtoReflect

func (x *GenerateResponse) ProtoReflect() protoreflect.Message

func (*GenerateResponse) Reset

func (x *GenerateResponse) Reset()

func (*GenerateResponse) String

func (x *GenerateResponse) String() string

type PasswordHandler

type PasswordHandler interface {
	Generate(context.Context, *GenerateRequest, *GenerateResponse) error
}

type PasswordService

type PasswordService interface {
	Generate(ctx context.Context, in *GenerateRequest, opts ...client.CallOption) (*GenerateResponse, error)
}

func NewPasswordService

func NewPasswordService(name string, c client.Client) PasswordService

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL