Documentation
¶
Index ¶
- Constants
- func Create(tdfConfig TDFConfig, reader io.ReadSeeker, writer io.Writer) (int64, error)
- func GetAttributes(reader io.ReadSeeker) ([]string, error)
- func GetMetadata(authConfig AuthConfig, reader io.ReadSeeker) (string, error)
- func GetPayload(authConfig AuthConfig, reader io.ReadSeeker, writer io.Writer) (int64, error)
- type Assertion
- type AuthConfig
- type EncryptionInformation
- type Error
- type IntegrityAlgorithm
- type IntegrityInformation
- type KASInfo
- type KeyAccess
- type Manifest
- type Method
- type Option
- type Payload
- type RootSignature
- type SDK
- type Segment
- type TDFConfig
- func (tdfConfig *TDFConfig) AddAttributes(attributes []string)
- func (tdfConfig *TDFConfig) AddKasInformation(kasInfoList []KASInfo) error
- func (tdfConfig *TDFConfig) DisableEncryption()
- func (tdfConfig *TDFConfig) SetDefaultSegmentSize(size int64)
- func (tdfConfig *TDFConfig) SetMetaData(metaData string)
- func (tdfConfig *TDFConfig) SetXMLFormat()
- type TDFFormat
Constants ¶
const ( ErrGrpcDialFailed = Error("failed to dial grpc endpoint") ErrShutdownFailed = Error("failed to shutdown sdk") )
const ( JSONFormat = iota XMLFormat )
const ( HS256 = iota GMAC )
Variables ¶
This section is empty.
Functions ¶
func GetAttributes ¶
func GetAttributes(reader io.ReadSeeker) ([]string, error)
GetAttributes return the attributes present in tdf.
func GetMetadata ¶
func GetMetadata(authConfig AuthConfig, reader io.ReadSeeker) (string, error)
GetMetadata return the meta present in tdf.
func GetPayload ¶
func GetPayload(authConfig AuthConfig, reader io.ReadSeeker, writer io.Writer) (int64, error)
GetPayload decrypt the tdf and write the data to writer.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
// contains filtered or unexported fields
}
func NewAuthConfig ¶
func NewAuthConfig() (*AuthConfig, error)
NewAuthConfig Create a new instance of authConfig
type EncryptionInformation ¶
type EncryptionInformation struct { KeyAccessType string `json:"type"` Policy string `json:"policy"` KeyAccessObjs []KeyAccess `json:"keyAccess"` Method Method `json:"method"` IntegrityInformation `json:"integrityInformation"` }
type IntegrityAlgorithm ¶
type IntegrityAlgorithm = int
type IntegrityInformation ¶
type IntegrityInformation struct { RootSignature `json:"rootSignature"` SegmentHashAlgorithm string `json:"segmentHashAlg"` DefaultSegmentSize int64 `json:"segmentSizeDefault"` DefaultEncryptedSegSize int64 `json:"encryptedSegmentSizeDefault"` Segments []Segment `json:"segments"` }
type Manifest ¶
type Manifest struct { EncryptionInformation `json:"encryptionInformation"` Payload `json:"payload"` }
type Option ¶
type Option func(*config)
func WithClientCredentials ¶
WithClientCredentials returns an Option that sets up authentication with client credentials.
func WithInsecureConn ¶
func WithInsecureConn() Option
WithInsecureConn returns an Option that sets up an http connection.
type RootSignature ¶
type SDK ¶
type SDK struct { Namespaces namespaces.NamespaceServiceClient Attributes attributes.AttributesServiceClient ResourceMapping resourcemapping.ResourceMappingServiceClient SubjectMapping subjectmapping.SubjectMappingServiceClient KeyAccessServerRegistry kasregistry.KeyAccessServerRegistryServiceClient // contains filtered or unexported fields }
func (SDK) TokenExchange ¶
ExchangeToken exchanges a access token for a new token. https://datatracker.ietf.org/doc/html/rfc8693
type TDFConfig ¶
type TDFConfig struct {
// contains filtered or unexported fields
}
func NewTDFConfig ¶
NewTDFConfig Create a new instance of tdf config.
func (*TDFConfig) AddAttributes ¶
AddAttributes Add all the attributes used to create and read the tdf.
func (*TDFConfig) AddKasInformation ¶
AddKasInformation Add all the kas urls and their corresponding public keys that is required to create and read the tdf.
func (*TDFConfig) DisableEncryption ¶
func (tdfConfig *TDFConfig) DisableEncryption()
DisableEncryption TDFs create with this config will not be encrypted.
func (*TDFConfig) SetDefaultSegmentSize ¶
SetDefaultSegmentSize Set the default segment size.
func (*TDFConfig) SetMetaData ¶
SetMetaData Set the meta data.
func (*TDFConfig) SetXMLFormat ¶
func (tdfConfig *TDFConfig) SetXMLFormat()
SetXMLFormat TDFs created with this config will be in XML format.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package attributes is a reverse proxy.
|
Package attributes is a reverse proxy. |
Package authorization is a reverse proxy.
|
Package authorization is a reverse proxy. |
Package kasregistry is a reverse proxy.
|
Package kasregistry is a reverse proxy. |
Package namespaces is a reverse proxy.
|
Package namespaces is a reverse proxy. |
Package resourcemapping is a reverse proxy.
|
Package resourcemapping is a reverse proxy. |
Package subjectmapping is a reverse proxy.
|
Package subjectmapping is a reverse proxy. |