File: options_gen.go

package info (click to toggle)
golang-github-lestrrat-go-jwx 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,872 kB
  • sloc: sh: 222; makefile: 86; perl: 62
file content (33 lines) | stat: -rw-r--r-- 1,034 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Code generated by tools/cmd/genoptions/main.go. DO NOT EDIT.

package jwa

import "github.com/lestrrat-go/option"

type Option = option.Interface

// RegisterAlgorithmOption describes options that can be passed to the algorithm registering
// functions that support options such as RegisterKeyEncryptionAlgorithmWithOptions.
type RegisterAlgorithmOption interface {
	Option
	registerAlgorithmOption()
}

type registerAlgorithmOption struct {
	Option
}

func (*registerAlgorithmOption) registerAlgorithmOption() {}

type identSymmetricAlgorithm struct{}

func (identSymmetricAlgorithm) String() string {
	return "WithSymmetricAlgorithm"
}

// WithSymmetricAlgorithm lets the library know whether the algorithm is symmetric. This affects
// the response of the `IsSymmetric` method of the algorithm. If the algorithms does not support
// this method, using this option will result in an error.
func WithSymmetricAlgorithm(v bool) RegisterAlgorithmOption {
	return &registerAlgorithmOption{option.New(identSymmetricAlgorithm{}, v)}
}