password

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

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